summaryrefslogtreecommitdiffstats
path: root/Source/CPack
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/CPack
parent2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (diff)
downloadCMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.zip
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.gz
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.bz2
clang-tidy: Use emplace
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackGenerator.cxx3
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx2
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx20
4 files changed, 15 insertions, 14 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 326d26c..be4a18e 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -71,8 +71,8 @@ int cmCPackDragNDropGenerator::InitializeInternal()
// Starting with Xcode 4.3, look in "/Applications/Xcode.app" first:
//
std::vector<std::string> paths;
- paths.push_back("/Applications/Xcode.app/Contents/Developer/Tools");
- paths.push_back("/Developer/Tools");
+ paths.emplace_back("/Applications/Xcode.app/Contents/Developer/Tools");
+ paths.emplace_back("/Developer/Tools");
const std::string hdiutil_path =
cmSystemTools::FindProgram("hdiutil", std::vector<std::string>(), false);
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index b205105..f7f3f24 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1036,7 +1036,8 @@ int cmCPackGenerator::DoPackage()
* may update this during PackageFiles.
* (either putting several names or updating the provided one)
*/
- packageFileNames.push_back(tempPackageFileName ? tempPackageFileName : "");
+ packageFileNames.emplace_back(tempPackageFileName ? tempPackageFileName
+ : "");
toplevel = tempDirectory;
{ // scope that enables package generators to run internal scripts with
// latest CMake policies enabled
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index d02aa5a..4b865ca 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -610,7 +610,7 @@ bool cmCPackNSISGenerator::GetListOfSubdirectories(
}
}
}
- dirs.push_back(topdir);
+ dirs.emplace_back(topdir);
return true;
}
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index a24dd30..28e0561 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -340,16 +340,16 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
// If found, save result in the CPACK_INSTALLER_PROGRAM variable.
std::vector<std::string> paths;
- paths.push_back("/Applications/Xcode.app/Contents/Applications"
- "/PackageMaker.app/Contents/MacOS");
- paths.push_back("/Applications/Utilities"
- "/PackageMaker.app/Contents/MacOS");
- paths.push_back("/Applications"
- "/PackageMaker.app/Contents/MacOS");
- paths.push_back("/Developer/Applications/Utilities"
- "/PackageMaker.app/Contents/MacOS");
- paths.push_back("/Developer/Applications"
- "/PackageMaker.app/Contents/MacOS");
+ paths.emplace_back("/Applications/Xcode.app/Contents/Applications"
+ "/PackageMaker.app/Contents/MacOS");
+ paths.emplace_back("/Applications/Utilities"
+ "/PackageMaker.app/Contents/MacOS");
+ paths.emplace_back("/Applications"
+ "/PackageMaker.app/Contents/MacOS");
+ paths.emplace_back("/Developer/Applications/Utilities"
+ "/PackageMaker.app/Contents/MacOS");
+ paths.emplace_back("/Developer/Applications"
+ "/PackageMaker.app/Contents/MacOS");
std::string pkgPath;
const char* inst_program = this->GetOption("CPACK_INSTALLER_PROGRAM");