diff --git a/server/WebApi.cpp b/server/WebApi.cpp index a1abf642..5c1aab1a 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -346,7 +346,7 @@ public: return it->second; } - void for_each(std::function cb) { + void for_each(const std::function& cb) { std::lock_guard lck(_mtx); auto it = _map.begin(); while (it != _map.end()) {