diff options
Diffstat (limited to 'Source/cmFileMonitor.cxx')
-rw-r--r-- | Source/cmFileMonitor.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index 815de95e77..909be78ed7 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -36,7 +36,7 @@ public: class cmVirtualDirectoryWatcher : public cmIBaseWatcher { public: - ~cmVirtualDirectoryWatcher() + ~cmVirtualDirectoryWatcher() override { for (auto i : this->Children) { delete i.second; @@ -156,7 +156,7 @@ public: p->AddChildWatcher(ps, this); } - ~cmRealDirectoryWatcher() + ~cmRealDirectoryWatcher() override { // Handle is freed via uv_handle_close callback! } @@ -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; |