1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Replaced all usage of ScopedPointer with std::unique_ptr

This commit is contained in:
Tom Poole 2018-04-19 15:55:04 +01:00
parent e6104e3fed
commit ab863a6dc2
401 changed files with 1091 additions and 1113 deletions

View file

@ -195,7 +195,7 @@ public:
if (auto* assetStream = createAssetInputStream ("proaudio.path"))
{
ScopedPointer<InputStream> fileStream (assetStream);
std::unique_ptr<InputStream> fileStream (assetStream);
Path proAudioPath;
proAudioPath.loadPathFromStream (*fileStream);
@ -415,7 +415,7 @@ private:
void loadNewSample (InputStream* soundBuffer, const char* format)
{
ScopedPointer<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));
std::unique_ptr<AudioFormatReader> formatReader (formatManager.findFormatForFileExtension (format)->createReaderFor (soundBuffer, true));
BigInteger midiNotes;
midiNotes.setRange (0, 126, true);
@ -431,7 +431,7 @@ private:
auto* stream = new MemoryOutputStream (mb, true);
{
ScopedPointer<AudioFormatWriter> writer (formatManager.findFormatForFileExtension ("wav")->createWriterFor (stream, lastSampleRate, 1, 16,
std::unique_ptr<AudioFormatWriter> writer (formatManager.findFormatForFileExtension ("wav")->createWriterFor (stream, lastSampleRate, 1, 16,
StringPairArray(), 0));
writer->writeFromAudioSampleBuffer (currentRecording, 0, currentRecording.getNumSamples());
writer->flush();