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:
parent
e6104e3fed
commit
ab863a6dc2
401 changed files with 1091 additions and 1113 deletions
|
|
@ -602,7 +602,7 @@ private:
|
|||
return;
|
||||
}
|
||||
|
||||
fileChooser = new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif");
|
||||
fileChooser.reset (new FileChooser ("Select an audio file...", File(), "*.wav;*.mp3;*.aif"));
|
||||
|
||||
fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles,
|
||||
[safeThis] (const FileChooser& fc) mutable
|
||||
|
|
@ -639,7 +639,7 @@ private:
|
|||
ToggleButton loopButton { "Loop File" };
|
||||
|
||||
AudioFileReaderComponent& audioFileReader;
|
||||
ScopedPointer<FileChooser> fileChooser;
|
||||
std::unique_ptr<FileChooser> fileChooser;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -671,10 +671,10 @@ private:
|
|||
uint32 currentBlockSize = 512;
|
||||
uint32 currentNumChannels = 2;
|
||||
|
||||
ScopedPointer<AudioFormatReader> reader;
|
||||
ScopedPointer<AudioFormatReaderSource> readerSource;
|
||||
ScopedPointer<AudioTransportSource> transportSource;
|
||||
ScopedPointer<DSPDemo<DemoType>> currentDemo;
|
||||
std::unique_ptr<AudioFormatReader> reader;
|
||||
std::unique_ptr<AudioFormatReaderSource> readerSource;
|
||||
std::unique_ptr<AudioTransportSource> transportSource;
|
||||
std::unique_ptr<DSPDemo<DemoType>> currentDemo;
|
||||
|
||||
AudioSourcePlayer audioSourcePlayer;
|
||||
|
||||
|
|
@ -682,5 +682,5 @@ private:
|
|||
|
||||
AudioBuffer<float> fileReadBuffer;
|
||||
|
||||
ScopedPointer<DemoParametersComponent> parametersComponent;
|
||||
std::unique_ptr<DemoParametersComponent> parametersComponent;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ inline Image getImageFromAssets (const char* assetName)
|
|||
|
||||
if (img.isNull())
|
||||
{
|
||||
ScopedPointer<InputStream> juceIconStream (createAssetInputStream (assetName));
|
||||
std::unique_ptr<InputStream> juceIconStream (createAssetInputStream (assetName));
|
||||
|
||||
if (juceIconStream == nullptr)
|
||||
return {};
|
||||
|
|
@ -115,7 +115,7 @@ inline Image getImageFromAssets (const char* assetName)
|
|||
|
||||
inline String loadEntireAssetIntoString (const char* assetName)
|
||||
{
|
||||
ScopedPointer<InputStream> input (createAssetInputStream (assetName));
|
||||
std::unique_ptr<InputStream> input (createAssetInputStream (assetName));
|
||||
|
||||
if (input == nullptr)
|
||||
return {};
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ private:
|
|||
if (faceGroup.size() == 0)
|
||||
return nullptr;
|
||||
|
||||
ScopedPointer<Shape> shape (new Shape());
|
||||
std::unique_ptr<Shape> shape (new Shape());
|
||||
shape->name = name;
|
||||
shape->material = material;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue