summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-04-21 08:42:27 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-04-21 08:50:25 (GMT)
commit73020305afea789519b42ae59a5940e1dbc26e1a (patch)
treec84eb52107e86f3bab4819e9bd94b8334861c443 /Source
parentb432e933cb0b2b162149b7e3aeb6a37b00e78d5f (diff)
downloadCMake-73020305afea789519b42ae59a5940e1dbc26e1a.zip
CMake-73020305afea789519b42ae59a5940e1dbc26e1a.tar.gz
CMake-73020305afea789519b42ae59a5940e1dbc26e1a.tar.bz2
clang-tidy: avoid copy
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileMonitor.cxx2
-rw-r--r--Source/cmListFileCache.cxx5
2 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx
index 9e66035..ed794c3 100644
--- a/Source/cmFileMonitor.cxx
+++ b/Source/cmFileMonitor.cxx
@@ -236,7 +236,7 @@ public:
cmFileMonitor::Callback cb)
: Parent(p)
, PathSegment(ps)
- , CbList({ cb })
+ , CbList({ std::move(cb) })
{
assert(p);
assert(!ps.empty());
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 16297f3..929b1cd 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -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)