summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.cxx
parent2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (diff)
downloadCMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.zip
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.gz
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.bz2
clang-tidy: Use emplace
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 6618351..80ccd73 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -329,14 +329,14 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand(
int jobs, bool /*verbose*/, std::vector<std::string> const& makeOptions)
{
// now build the test
- makeCommand.push_back(
+ makeCommand.emplace_back(
this->SelectMakeProgram(makeProgram, this->GetXcodeBuildCommand()));
- makeCommand.push_back("-project");
+ makeCommand.emplace_back("-project");
std::string projectArg = projectName;
projectArg += ".xcode";
projectArg += "proj";
- makeCommand.push_back(projectArg);
+ makeCommand.emplace_back(projectArg);
bool clean = false;
std::string realTarget = targetName;
@@ -345,23 +345,23 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand(
realTarget = "ALL_BUILD";
}
if (clean) {
- makeCommand.push_back("clean");
+ makeCommand.emplace_back("clean");
} else {
- makeCommand.push_back("build");
+ makeCommand.emplace_back("build");
}
- makeCommand.push_back("-target");
+ makeCommand.emplace_back("-target");
if (!realTarget.empty()) {
- makeCommand.push_back(realTarget);
+ makeCommand.emplace_back(realTarget);
} else {
- makeCommand.push_back("ALL_BUILD");
+ makeCommand.emplace_back("ALL_BUILD");
}
- makeCommand.push_back("-configuration");
- makeCommand.push_back(!config.empty() ? config : "Debug");
+ makeCommand.emplace_back("-configuration");
+ makeCommand.emplace_back(!config.empty() ? config : "Debug");
if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
- makeCommand.push_back("-jobs");
+ makeCommand.emplace_back("-jobs");
if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
- makeCommand.push_back(std::to_string(jobs));
+ makeCommand.emplace_back(std::to_string(jobs));
}
}
@@ -1051,7 +1051,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
this->CurrentConfigurationTypes.clear();
this->CurrentMakefile->GetConfigurations(this->CurrentConfigurationTypes);
if (this->CurrentConfigurationTypes.empty()) {
- this->CurrentConfigurationTypes.push_back("");
+ this->CurrentConfigurationTypes.emplace_back();
}
}