diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-09 17:13:42 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-09 23:24:06 (GMT) |
commit | 36c8cae2e8c23228d3292e77b9bfc65b009bb263 (patch) | |
tree | d2dae86bea8247398e6edef358a72cd661e588a7 /Source/cmComputeTargetDepends.cxx | |
parent | 352999ac4647d6c5b0d81890df4531d677532843 (diff) | |
download | CMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.zip CMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.tar.gz CMake-36c8cae2e8c23228d3292e77b9bfc65b009bb263.tar.bz2 |
cmLocalGenerator: modernize memory management
Diffstat (limited to 'Source/cmComputeTargetDepends.cxx')
-rw-r--r-- | Source/cmComputeTargetDepends.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index c22cf4a..58ec53a 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -158,9 +158,8 @@ void cmComputeTargetDepends::GetTargetDirectDepends(cmGeneratorTarget const* t, void cmComputeTargetDepends::CollectTargets() { // Collect all targets from all generators. - std::vector<cmLocalGenerator*> const& lgens = - this->GlobalGenerator->GetLocalGenerators(); - for (cmLocalGenerator* lgen : lgens) { + auto const& lgens = this->GlobalGenerator->GetLocalGenerators(); + for (const auto& lgen : lgens) { for (const auto& ti : lgen->GetGeneratorTargets()) { int index = static_cast<int>(this->Targets.size()); this->TargetIndex[ti.get()] = index; |