summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-18 17:05:28 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-18 17:18:43 (GMT)
commit8211010c3f0d262cd7d300856f34a3af01f766b3 (patch)
tree156eadab2f1c633110bd9a29315f8a4941342eb8
parentb54225732f6b46c8f2ab0b2dd76ffa04d173b2f0 (diff)
downloadCMake-8211010c3f0d262cd7d300856f34a3af01f766b3.zip
CMake-8211010c3f0d262cd7d300856f34a3af01f766b3.tar.gz
CMake-8211010c3f0d262cd7d300856f34a3af01f766b3.tar.bz2
cmakemain: Use member insert in command line handling code.
-rw-r--r--Source/cmakemain.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 61b175e..83ba72f 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);
}