diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-18 17:05:28 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-18 17:18:43 (GMT) |
commit | 8211010c3f0d262cd7d300856f34a3af01f766b3 (patch) | |
tree | 156eadab2f1c633110bd9a29315f8a4941342eb8 /Source/cmakemain.cxx | |
parent | b54225732f6b46c8f2ab0b2dd76ffa04d173b2f0 (diff) | |
download | CMake-8211010c3f0d262cd7d300856f34a3af01f766b3.zip CMake-8211010c3f0d262cd7d300856f34a3af01f766b3.tar.gz CMake-8211010c3f0d262cd7d300856f34a3af01f766b3.tar.bz2 |
cmakemain: Use member insert in command line handling code.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 6 |
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); } |