mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
clang-tidy: fix modernize-pass-by-value lints
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user