clang-tidy: avoid copy

This commit is contained in:
Daniel Pfeifer 2017-04-21 10:42:27 +02:00
parent b432e933cb
commit 73020305af
2 changed files with 4 additions and 3 deletions

View File

@ -236,7 +236,7 @@ public:
cmFileMonitor::Callback cb)
: Parent(p)
, PathSegment(ps)
, CbList({ cb })
, CbList({ std::move(cb) })
{
assert(p);
assert(!ps.empty());

View File

@ -16,7 +16,7 @@
struct cmListFileParser
{
cmListFileParser(cmListFile* lf, cmListFileBacktrace lfbt,
cmListFileParser(cmListFile* lf, cmListFileBacktrace const& lfbt,
cmMessenger* messenger, const char* filename);
~cmListFileParser();
void IssueFileOpenError(std::string const& text) const;
@ -39,7 +39,8 @@ struct cmListFileParser
} Separation;
};
cmListFileParser::cmListFileParser(cmListFile* lf, cmListFileBacktrace lfbt,
cmListFileParser::cmListFileParser(cmListFile* lf,
cmListFileBacktrace const& lfbt,
cmMessenger* messenger,
const char* filename)
: ListFile(lf)