From aac44e71e6a6c2630f1c1e61b34cf91aa775dc02 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 14 Jan 2015 21:26:44 +0100 Subject: Convert raw loops to vector member insert. --- Source/cmComputeLinkDepends.cxx | 7 ++----- Source/cmLocalUnixMakefileGenerator3.cxx | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index f0bae28..32d5cd3 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -676,11 +676,8 @@ void cmComputeLinkDepends::InferDependencies() } // Add the inferred dependencies to the graph. - for(DependSet::const_iterator j = common.begin(); j != common.end(); ++j) - { - int dependee_index = *j; - this->EntryConstraintGraph[depender_index].push_back(dependee_index); - } + cmGraphEdgeList& edges = this->EntryConstraintGraph[depender_index]; + edges.insert(edges.end(), common.begin(), common.end()); } } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index ebaee37..46279fa 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -738,11 +738,8 @@ cmLocalUnixMakefileGenerator3 // Add the output to the local help if requested. if(in_help) { - for (std::vector::const_iterator i = outputs.begin(); - i != outputs.end(); ++i) - { - this->LocalHelp.push_back(*i); - } + this->LocalHelp.insert(this->LocalHelp.end(), + outputs.begin(), outputs.end()); } } -- cgit v0.12