diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-01-12 15:58:54 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-01-14 10:03:07 (GMT) |
commit | f466cea3c9edffb1f524b64c514f8b7ef3913988 (patch) | |
tree | d6623a9efbd040dd7e6a091117fd642bc003b81c /Source/cmGlobalGenerator.cxx | |
parent | 2d5e9f3d8cf44fafcd9a3b75ebce3d6fe383fe4e (diff) | |
download | CMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.zip CMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.tar.gz CMake-f466cea3c9edffb1f524b64c514f8b7ef3913988.tar.bz2 |
cmMakefile: modernize memory management
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 4cbcda0..c3ab4b7 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1412,7 +1412,7 @@ bool cmGlobalGenerator::Compute() for (const auto& localGen : this->LocalGenerators) { cmMakefile* mf = localGen->GetMakefile(); - for (cmInstallGenerator* g : mf->GetInstallGenerators()) { + for (const auto& g : mf->GetInstallGenerators()) { if (!g->Compute(localGen.get())) { return false; } @@ -1687,10 +1687,10 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes) std::map<cmTarget*, cmGeneratorTarget*> importedMap; for (unsigned int i = 0; i < this->Makefiles.size(); ++i) { auto& mf = this->Makefiles[i]; - for (cmTarget* ownedImpTgt : mf->GetOwnedImportedTargets()) { + for (const auto& ownedImpTgt : mf->GetOwnedImportedTargets()) { cmLocalGenerator* lg = this->LocalGenerators[i].get(); - auto gt = cm::make_unique<cmGeneratorTarget>(ownedImpTgt, lg); - importedMap[ownedImpTgt] = gt.get(); + auto gt = cm::make_unique<cmGeneratorTarget>(ownedImpTgt.get(), lg); + importedMap[ownedImpTgt.get()] = gt.get(); lg->AddOwnedImportedGeneratorTarget(std::move(gt)); } } |