From eb8e39d897b1fc414c040586652c6621688902bb Mon Sep 17 00:00:00 2001 From: cqm Date: Thu, 31 Oct 2024 21:39:28 +0800 Subject: [PATCH] use ref callback --- server/WebApi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) {