diff options
author | Craig Scott <craig.scott@crascit.com> | 2017-08-21 13:13:53 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-08-21 13:13:59 (GMT) |
commit | 9a0a6f91ae5c8e25197d50e7045b6c4418f607b2 (patch) | |
tree | 277e4d2570cfe14b06de4c7a35748bef9f5faa1e /Source/cmGlobalVisualStudioGenerator.cxx | |
parent | b14fdea3a63c7c8d91b0b02c57d1254a106376de (diff) | |
parent | 7bc65770171924e550d2937b07b54b83b9fb59ab (diff) | |
download | CMake-9a0a6f91ae5c8e25197d50e7045b6c4418f607b2.zip CMake-9a0a6f91ae5c8e25197d50e7045b6c4418f607b2.tar.gz CMake-9a0a6f91ae5c8e25197d50e7045b6c4418f607b2.tar.bz2 |
Merge topic 'perf-targetIter-missedGenerators'
7bc65770 Performance: Fix a few more unnecessary vector copies missed in af3fd6f
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1157
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); } |