diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-01-16 06:13:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-17 18:12:02 (GMT) |
commit | ef61997b1be5c2f542472f8eb48dac62cd26bf5c (patch) | |
tree | 3d17442b633d74e8e18f4f4c48578f3b639d25be /Source/cmakemain.cxx | |
parent | 2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (diff) | |
download | CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.zip CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.gz CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.bz2 |
clang-tidy: Use emplace
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 12 |
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; |