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/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 071d49c..8f260ec 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -440,8 +440,8 @@ void cmGlobalXCodeGenerator::AddExtraTargets( continue; } - std::vector<cmGeneratorTarget*> tgts = lg->GetGeneratorTargets(); - for (std::vector<cmGeneratorTarget*>::iterator l = tgts.begin(); + const std::vector<cmGeneratorTarget*>& tgts = lg->GetGeneratorTargets(); + for (std::vector<cmGeneratorTarget*>::const_iterator l = tgts.begin(); l != tgts.end(); l++) { cmGeneratorTarget* target = *l; @@ -925,12 +925,12 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( cmLocalGenerator* gen, std::vector<cmXCodeObject*>& targets) { this->SetCurrentLocalGenerator(gen); - std::vector<cmGeneratorTarget*> tgts = + const std::vector<cmGeneratorTarget*>& tgts = this->CurrentLocalGenerator->GetGeneratorTargets(); typedef std::map<std::string, cmGeneratorTarget*, cmCompareTargets> cmSortedTargets; cmSortedTargets sortedTargets; - for (std::vector<cmGeneratorTarget*>::iterator l = tgts.begin(); + for (std::vector<cmGeneratorTarget*>::const_iterator l = tgts.begin(); l != tgts.end(); l++) { sortedTargets[(*l)->GetName()] = *l; } @@ -1210,7 +1210,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( void cmGlobalXCodeGenerator::ForceLinkerLanguages() { for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) { - std::vector<cmGeneratorTarget*> tgts = + const std::vector<cmGeneratorTarget*>& tgts = this->LocalGenerators[i]->GetGeneratorTargets(); // All targets depend on the build-system check target. for (std::vector<cmGeneratorTarget*>::const_iterator ti = tgts.begin(); @@ -2706,8 +2706,8 @@ bool cmGlobalXCodeGenerator::CreateGroups( i != generators.end(); ++i) { cmMakefile* mf = (*i)->GetMakefile(); std::vector<cmSourceGroup> sourceGroups = mf->GetSourceGroups(); - std::vector<cmGeneratorTarget*> tgts = (*i)->GetGeneratorTargets(); - for (std::vector<cmGeneratorTarget*>::iterator l = tgts.begin(); + const std::vector<cmGeneratorTarget*>& tgts = (*i)->GetGeneratorTargets(); + for (std::vector<cmGeneratorTarget*>::const_iterator l = tgts.begin(); l != tgts.end(); l++) { cmGeneratorTarget* gtgt = *l; |