summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-21 12:51:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-21 12:51:54 (GMT)
commit4dba5d6ce251257259874bce394b2fba954e200c (patch)
treef775a504eb80d0383231fb99eb301a962a989fb2 /Source/cmakemain.cxx
parent7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab (diff)
parentef61997b1be5c2f542472f8eb48dac62cd26bf5c (diff)
downloadCMake-4dba5d6ce251257259874bce394b2fba954e200c.zip
CMake-4dba5d6ce251257259874bce394b2fba954e200c.tar.gz
CMake-4dba5d6ce251257259874bce394b2fba954e200c.tar.bz2
Merge topic 'use-emplace'
ef61997b1b clang-tidy: Use emplace 2e5307a2a4 CTestSVN: Accept std::string in SVNInfo constructor Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2811
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 84d1414..5a04eab 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -106,7 +106,7 @@ static int do_command(int ac, char const* const* av)
{
std::vector<std::string> args;
args.reserve(ac - 1);
- args.push_back(av[0]);
+ args.emplace_back(av[0]);
args.insert(args.end(), av + 2, av + ac);
return cmcmd::ExecuteCMakeCommand(args);
}
@@ -288,14 +288,14 @@ int do_cmake(int ac, char const* const* av)
return 1;
}
workingMode = cmake::SCRIPT_MODE;
- args.push_back(av[i]);
+ args.emplace_back(av[i]);
i++;
- args.push_back(av[i]);
+ args.emplace_back(av[i]);
} else if (cmHasLiteralPrefix(av[i], "--find-package")) {
workingMode = cmake::FIND_PACKAGE_MODE;
- args.push_back(av[i]);
+ args.emplace_back(av[i]);
} else {
- args.push_back(av[i]);
+ args.emplace_back(av[i]);
}
}
if (sysinfo) {
@@ -386,7 +386,7 @@ static int do_build(int ac, char const* const* av)
Doing doing = DoingDir;
for (int i = 2; i < ac; ++i) {
if (doing == DoingNative) {
- nativeOptions.push_back(av[i]);
+ nativeOptions.emplace_back(av[i]);
} else if ((strcmp(av[i], "-j") == 0) ||
(strcmp(av[i], "--parallel") == 0)) {
jobs = cmake::DEFAULT_BUILD_PARALLEL_LEVEL;