summaryrefslogtreecommitdiffstats
path: root/Source/cmExecuteProcessCommand.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-01-16 06:13:07 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-17 18:12:02 (GMT)
commitef61997b1be5c2f542472f8eb48dac62cd26bf5c (patch)
tree3d17442b633d74e8e18f4f4c48578f3b639d25be /Source/cmExecuteProcessCommand.cxx
parent2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (diff)
downloadCMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.zip
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.gz
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.bz2
clang-tidy: Use emplace
Diffstat (limited to 'Source/cmExecuteProcessCommand.cxx')
-rw-r--r--Source/cmExecuteProcessCommand.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx
index 679a648..8de012a 100644
--- a/Source/cmExecuteProcessCommand.cxx
+++ b/Source/cmExecuteProcessCommand.cxx
@@ -54,7 +54,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args,
if (args[i] == "COMMAND") {
doing_command = true;
command_index = cmds.size();
- cmds.push_back(std::vector<const char*>());
+ cmds.emplace_back();
} else if (args[i] == "OUTPUT_VARIABLE") {
doing_command = false;
if (++i < args.size()) {
@@ -327,15 +327,15 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args,
cmsysProcess_GetExitValueByIndex(cp, static_cast<int>(i));
char buf[16];
sprintf(buf, "%d", exitCode);
- res.push_back(buf);
+ res.emplace_back(buf);
} break;
case kwsysProcess_StateByIndex_Exception:
- res.push_back(cmsysProcess_GetExceptionStringByIndex(
+ res.emplace_back(cmsysProcess_GetExceptionStringByIndex(
cp, static_cast<int>(i)));
break;
case kwsysProcess_StateByIndex_Error:
default:
- res.push_back("Error getting the child return code");
+ res.emplace_back("Error getting the child return code");
break;
}
}