diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-07-04 16:14:22 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-07-14 13:37:30 (GMT) |
commit | 1591f138f1a40fccdde7fb2796ee2d2d8f3f97bb (patch) | |
tree | 4db8440a950a88b7c15ea43218f98f61775bf889 /Source/cmMakefile.cxx | |
parent | d9b2c7dae242868f13fc366773fb09448da26e8d (diff) | |
download | CMake-1591f138f1a40fccdde7fb2796ee2d2d8f3f97bb.zip CMake-1591f138f1a40fccdde7fb2796ee2d2d8f3f97bb.tar.gz CMake-1591f138f1a40fccdde7fb2796ee2d2d8f3f97bb.tar.bz2 |
modernize: manage cmCommand instances using unique_ptr.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5f22a07..501ea69 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -118,7 +118,6 @@ cmMakefile::~cmMakefile() cmDeleteAll(this->SourceFiles); cmDeleteAll(this->Tests); cmDeleteAll(this->ImportedTargetsOwned); - cmDeleteAll(this->FinalPassCommands); cmDeleteAll(this->FunctionBlockers); cmDeleteAll(this->EvaluationFiles); } @@ -418,7 +417,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, } } else if (pcmd->HasFinalPass()) { // use the command - this->FinalPassCommands.push_back(pcmd.release()); + this->FinalPassCommands.push_back(std::move(pcmd)); } } } else { @@ -776,8 +775,8 @@ void cmMakefile::FinalPass() // give all the commands a chance to do something // after the file has been parsed before generation - for (cmCommand* fpCommand : this->FinalPassCommands) { - fpCommand->FinalPass(); + for (auto& command : this->FinalPassCommands) { + command->FinalPass(); } // go through all configured files and see which ones still exist. |