Avoid some copies

This commit is contained in:
Daniel Pfeifer
2016-10-30 19:50:19 +01:00
parent 602b78aa79
commit 5214bb354b
5 changed files with 16 additions and 16 deletions
+5 -2
View File
@@ -247,7 +247,10 @@ public:
void StopWatching() final {}
void AppendCallback(cmFileMonitor::Callback cb) { CbList.push_back(cb); }
void AppendCallback(cmFileMonitor::Callback const& cb)
{
this->CbList.push_back(cb);
}
std::string Path() const final
{
@@ -310,7 +313,7 @@ cmFileMonitor::~cmFileMonitor()
}
void cmFileMonitor::MonitorPaths(const std::vector<std::string>& paths,
Callback cb)
Callback const& cb)
{
for (const auto& p : paths) {
std::vector<std::string> pathSegments;