From 8211010c3f0d262cd7d300856f34a3af01f766b3 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 18 Jan 2015 18:05:28 +0100 Subject: [PATCH] cmakemain: Use member insert in command line handling code. --- Source/cmakemain.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 61b175e13..83ba72f6f 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 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); }