summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-09-19 13:54:08 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-28 11:23:40 (GMT)
commitbb0ad1bea81f60cbbb2c66c2c0ab24ee12db0026 (patch)
tree06db4eb05a227219eef3e265fef60f601640d051 /Source/CPack
parent8cc33aeaec2798c9ff5a3af23e361ee22fa2ba95 (diff)
downloadCMake-bb0ad1bea81f60cbbb2c66c2c0ab24ee12db0026.zip
CMake-bb0ad1bea81f60cbbb2c66c2c0ab24ee12db0026.tar.gz
CMake-bb0ad1bea81f60cbbb2c66c2c0ab24ee12db0026.tar.bz2
Fix some occurrences using string by value rather than by const&
Fix issues diagnosed by clang-tidy - performance-unnecessary-value-param - performance-unnecessary-copy-initialization Signed-off-by: Matthias Maennich <matthias@maennich.net>
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx3
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 88204c8..4fbd194 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -769,7 +769,8 @@ std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix(
bool cmCPackDragNDropGenerator::WriteLicense(
cmGeneratedFileStream& outputStream, int licenseNumber,
- std::string licenseLanguage, std::string licenseFile, std::string* error)
+ std::string licenseLanguage, const std::string& licenseFile,
+ std::string* error)
{
if (!licenseFile.empty() && !singleLicense) {
licenseNumber = 5002;
diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h
index 8565c68..d8c5c83 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.h
+++ b/Source/CPack/cmCPackDragNDropGenerator.h
@@ -45,8 +45,8 @@ private:
bool singleLicense;
bool WriteLicense(cmGeneratedFileStream& outputStream, int licenseNumber,
- std::string licenseLanguage, std::string licenseFile,
- std::string* error);
+ std::string licenseLanguage,
+ const std::string& licenseFile, std::string* error);
bool BreakLongLine(const std::string& line, std::vector<std::string>& lines,
std::string* error);
void EscapeQuotesAndBackslashes(std::string& line);