summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmComputeLinkDepends.cxx7
-rw-r--r--Source/cmGeneratorExpression.cxx8
-rw-r--r--Source/cmListCommand.cxx10
-rw-r--r--Source/cmLoadCacheCommand.cxx5
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx7
-rw-r--r--Source/cmakemain.cxx12
6 files changed, 13 insertions, 36 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/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index b2a2386..bf96951 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -98,12 +98,8 @@ const char *cmCompiledGeneratorExpression::Evaluate(
{
this->Output += (*it)->Evaluate(&context, dagChecker);
- for(std::set<std::string>::const_iterator
- p = context.SeenTargetProperties.begin();
- p != context.SeenTargetProperties.end(); ++p)
- {
- this->SeenTargetProperties.insert(*p);
- }
+ this->SeenTargetProperties.insert(context.SeenTargetProperties.begin(),
+ context.SeenTargetProperties.end());
if (context.HadError)
{
this->Output = "";
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index c3f0f57..5a0eee3 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -345,13 +345,9 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args)
return false;
}
}
- size_t cc;
- size_t cnt = 0;
- for ( cc = 3; cc < args.size(); ++ cc )
- {
- varArgsExpanded.insert(varArgsExpanded.begin()+item+cnt, args[cc]);
- cnt ++;
- }
+
+ varArgsExpanded.insert(varArgsExpanded.begin()+item,
+ args.begin() + 3, args.end());
std::string value = cmJoin(varArgsExpanded, ";");
this->Makefile->AddDefinition(listName, value.c_str());
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx
index 427e29d..4f6e0c3 100644
--- a/Source/cmLoadCacheCommand.cxx
+++ b/Source/cmLoadCacheCommand.cxx
@@ -110,10 +110,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args)
// Prepare the table of variables to read.
this->Prefix = args[2];
- for(unsigned int i=3; i < args.size(); ++i)
- {
- this->VariablesToRead.insert(args[i]);
- }
+ this->VariablesToRead.insert(args.begin() + 3, args.end());
// Read the cache file.
cmsys::ifstream fin(cacheFile.c_str());
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<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());
}
}
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 61b175e..9e84e68 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -96,11 +96,9 @@ static const char * cmDocumentationOptions[][2] =
static int do_command(int ac, char const* const* av)
{
std::vector<std::string> args;
+ args.reserve(ac - 1);
args.push_back(av[0]);
- for(int i = 2; i < ac; ++i)
- {
- args.push_back(av[i]);
- }
+ args.insert(args.end(), av + 2, av + ac);
return cmcmd::ExecuteCMakeCommand(args);
}
@@ -221,11 +219,7 @@ int do_cmake(int ac, char const* const* av)
// the command line args are processed here so that you can do
// -DCMAKE_MODULE_PATH=/some/path and have this value accessible here
- std::vector<std::string> args;
- for(int i =0; i < ac; ++i)
- {
- args.push_back(av[i]);
- }
+ std::vector<std::string> args(av, av + ac);
hcm.SetCacheArgs(args);
std::vector<cmDocumentationEntry> generators;