summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-22 18:48:09 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-29 17:39:29 (GMT)
commit860adec5283c8ee7b01c0c1b2e811ae305f3602d (patch)
tree2bb8cbc354a40066d9da72d0212c49799a8a6ac6 /Source
parent27e37b8a5a661c7c6ea700d6b3e535cf4a582277 (diff)
downloadCMake-860adec5283c8ee7b01c0c1b2e811ae305f3602d.zip
CMake-860adec5283c8ee7b01c0c1b2e811ae305f3602d.tar.gz
CMake-860adec5283c8ee7b01c0c1b2e811ae305f3602d.tar.bz2
clang-tidy: fix `modernize-pass-by-value` lints
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h4
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx4
-rw-r--r--Source/cmVisualStudioSlnData.h10
4 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 6fe88cd..b76db10 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -133,8 +133,8 @@ public:
std::string First;
public:
- TargetCompare(std::string const& first)
- : First(first)
+ TargetCompare(std::string first)
+ : First(std::move(first))
{
}
bool operator()(cmGeneratorTarget const* l,
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 138ea54..192f1de 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -559,10 +559,10 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFortranLinkFlagTable[] = {
class cmLocalVisualStudio7Generator::EventWriter
{
public:
- EventWriter(cmLocalVisualStudio7Generator* lg, const std::string& config,
+ EventWriter(cmLocalVisualStudio7Generator* lg, std::string config,
std::ostream& os)
: LG(lg)
- , Config(config)
+ , Config(std::move(config))
, Stream(os)
{
}
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index bf7dda5..6a1966c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -80,10 +80,10 @@ struct cmVisualStudio10TargetGenerator::Elem
bool HasContent = false;
std::string Tag;
- Elem(std::ostream& s, const std::string& tag)
+ Elem(std::ostream& s, std::string tag)
: S(s)
, Indent(0)
- , Tag(tag)
+ , Tag(std::move(tag))
{
this->StartElement();
}
diff --git a/Source/cmVisualStudioSlnData.h b/Source/cmVisualStudioSlnData.h
index 7abe871..3188635 100644
--- a/Source/cmVisualStudioSlnData.h
+++ b/Source/cmVisualStudioSlnData.h
@@ -14,11 +14,11 @@ class cmSlnProjectEntry
{
public:
cmSlnProjectEntry() = default;
- cmSlnProjectEntry(const std::string& guid, const std::string& name,
- const std::string& relativePath)
- : Guid(guid)
- , Name(name)
- , RelativePath(relativePath)
+ cmSlnProjectEntry(std::string guid, std::string name,
+ std::string relativePath)
+ : Guid(std::move(guid))
+ , Name(std::move(name))
+ , RelativePath(std::move(relativePath))
{
}