deprecate ForEachClientWeak in favor of new ForEachClient

This commit is contained in:
Lion Kortlepel
2022-11-13 12:57:09 +01:00
parent a8ad9034b2
commit d7369c3bc5
9 changed files with 43 additions and 19 deletions

View File

@@ -138,7 +138,7 @@ int TClient::SecondsSinceLastPing() {
std::optional<std::weak_ptr<TClient>> GetClient(TServer& Server, int ID) {
std::optional<std::weak_ptr<TClient>> MaybeClient { std::nullopt };
Server.ForEachClient([&](std::weak_ptr<TClient> CPtr) -> bool {
Server.ForEachClientWeak([&](std::weak_ptr<TClient> CPtr) -> bool {
ReadLock Lock(Server.GetClientMutex());
try {
auto C = CPtr.lock();