diff options
author | Aaron Orenstein <aorenste@fb.com> | 2017-08-18 14:59:52 (GMT) |
---|---|---|
committer | Aaron Orenstein <aorenste@fb.com> | 2017-08-18 14:59:52 (GMT) |
commit | 7bc65770171924e550d2937b07b54b83b9fb59ab (patch) | |
tree | 939ec4a9f494913f76d82b0d9e219b95c178f426 /Source/cmGlobalVisualStudioGenerator.cxx | |
parent | 10edb0c7d52b1252517990c2e8b898a804f440d3 (diff) | |
download | CMake-7bc65770171924e550d2937b07b54b83b9fb59ab.zip CMake-7bc65770171924e550d2937b07b54b83b9fb59ab.tar.gz CMake-7bc65770171924e550d2937b07b54b83b9fb59ab.tar.bz2 |
Performance: Fix a few more unnecessary vector copies missed in af3fd6f
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 87a22d1..f85e409 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -82,8 +82,10 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() // Now make all targets depend on the ALL_BUILD target for (std::vector<cmLocalGenerator*>::iterator i = gen.begin(); i != gen.end(); ++i) { - std::vector<cmGeneratorTarget*> targets = (*i)->GetGeneratorTargets(); - for (std::vector<cmGeneratorTarget*>::iterator t = targets.begin(); + const std::vector<cmGeneratorTarget*>& targets = + (*i)->GetGeneratorTargets(); + for (std::vector<cmGeneratorTarget*>::const_iterator t = + targets.begin(); t != targets.end(); ++t) { cmGeneratorTarget* tgt = *t; if (tgt->GetType() == cmStateEnums::GLOBAL_TARGET || @@ -298,8 +300,10 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() std::vector<cmLocalGenerator*>& gen = it->second; for (std::vector<cmLocalGenerator*>::iterator i = gen.begin(); i != gen.end(); ++i) { - std::vector<cmGeneratorTarget*> targets = (*i)->GetGeneratorTargets(); - for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin(); + const std::vector<cmGeneratorTarget*>& targets = + (*i)->GetGeneratorTargets(); + for (std::vector<cmGeneratorTarget*>::const_iterator ti = + targets.begin(); ti != targets.end(); ++ti) { this->ComputeVSTargetDepends(*ti); } |