mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
Avoid some copies
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user