From fa889c4d2f49ed4b3edc8e7820b4d9bbfeeeb2a3 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 18 Jan 2015 18:18:54 +0100 Subject: [PATCH] cmakemain: Initialize vector content with iterators directly. --- Source/cmakemain.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 83ba72f6f..9e84e68e1 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -219,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 args; - for(int i =0; i < ac; ++i) - { - args.push_back(av[i]); - } + std::vector args(av, av + ac); hcm.SetCacheArgs(args); std::vector generators;