瀏覽代碼

Convert raw loops to vector member insert.

Stephen Kelly 10 年之前
父節點
當前提交
aac44e71e6
共有 2 個文件被更改,包括 4 次插入10 次删除
  1. 2 5
      Source/cmComputeLinkDepends.cxx
  2. 2 5
      Source/cmLocalUnixMakefileGenerator3.cxx

+ 2 - 5
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());
     }
 }
 

+ 2 - 5
Source/cmLocalUnixMakefileGenerator3.cxx

@@ -738,11 +738,8 @@ cmLocalUnixMakefileGenerator3
   // Add the output to the local help if requested.
   if(in_help)
     {
-    for (std::vector<std::string>::const_iterator i = outputs.begin();
-         i != outputs.end(); ++i)
-      {
-      this->LocalHelp.push_back(*i);
-      }
+    this->LocalHelp.insert(this->LocalHelp.end(),
+                           outputs.begin(), outputs.end());
     }
 }