mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-29 02:40:05 +00:00
Misc ScopedPointer changes to start using reset() and get() rather than assignments and casts (part of an ongoing drift towards more std::unique_ptr compatibility)
This commit is contained in:
parent
c1bdfc6a55
commit
2dc9316420
131 changed files with 574 additions and 576 deletions
|
|
@ -136,7 +136,7 @@ namespace
|
|||
|
||||
if (! project->loadFrom (projectFile, true))
|
||||
{
|
||||
project = nullptr;
|
||||
project.reset();
|
||||
throw CommandLineError ("Failed to load the project file: " + projectFile.getFullPathName());
|
||||
}
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ namespace
|
|||
Result error (justSaveResources ? project->saveResourcesOnly (project->getFile())
|
||||
: project->saveProject (project->getFile(), true));
|
||||
|
||||
project = nullptr;
|
||||
project.reset();
|
||||
|
||||
if (error.failed())
|
||||
throw CommandLineError ("Error when saving: " + error.getErrorMessage());
|
||||
|
|
@ -302,7 +302,7 @@ namespace
|
|||
ScopedPointer<FileOutputStream> out (temp.getFile().createOutputStream());
|
||||
|
||||
bool ok = out != nullptr && zip.writeToStream (*out, nullptr);
|
||||
out = nullptr;
|
||||
out.reset();
|
||||
ok = ok && temp.overwriteTargetFileWithTemporary();
|
||||
|
||||
if (! ok)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue