clang-tidy: Use emplace

This commit is contained in:
Regina Pfeifer
2019-01-16 07:13:07 +01:00
committed by Brad King
parent 2e5307a2a4
commit ef61997b1b
57 changed files with 266 additions and 266 deletions
+4 -4
View File
@@ -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;
}
}