summaryrefslogtreecommitdiffstats
path: root/Source/cmFileMonitor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFileMonitor.cxx')
-rw-r--r--Source/cmFileMonitor.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx
index b55341b..9844306 100644
--- a/Source/cmFileMonitor.cxx
+++ b/Source/cmFileMonitor.cxx
@@ -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;