summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-22 13:59:50 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-29 12:39:44 -0500
commit6d2aa54d620a6526cc23e59b30ee0191d61ac59d (patch)
tree742976c881a7436c02bc6167968e6e22ece04369
parentb72c45e39fa9dd5870046bb5cf25d33049006bd5 (diff)
downloadcmake-6d2aa54d620a6526cc23e59b30ee0191d61ac59d.tar.gz
clang-tidy: fix `performance-unnecessary-copy-initialization` lints
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index d7bf106b3d..ed1f3330cc 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -426,7 +426,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
cmValue expath = target->GetProperty("EXTERNAL_MSPROJECT");
if (expath) {
std::string project = target->GetName();
- std::string location = *expath;
+ std::string const& location = *expath;
this->WriteExternalProject(fout, project, location,
target->GetProperty("VS_PROJECT_TYPE"),
@@ -506,7 +506,7 @@ void cmGlobalVisualStudio7Generator::WriteFoldersContent(std::ostream& fout)
std::string guidParent(this->GetGUID(key));
for (std::string const& it : iter.second) {
- std::string value(it);
+ std::string const& value(it);
std::string guid(this->GetGUID(value));
fout << "\t\t{" << guid << "} = {" << guidParent << "}\n";
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 753a532dce..07adce0446 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -424,7 +424,7 @@ void cmVisualStudio10TargetGenerator::Generate()
cmStrCat(this->LocalGenerator->GetCurrentBinaryDirectory(), '/',
this->Name, ProjectFileExtension);
cmGeneratedFileStream BuildFileStream(path);
- const std::string PathToProjectFile = path;
+ const std::string& PathToProjectFile = path;
BuildFileStream.SetCopyIfDifferent(true);
// Write the encoding header into the file