From 3297c1cbed69e32c6b186c24d847644c5f7f3cc8 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Mon, 8 Jan 2024 12:17:48 +0100 Subject: [PATCH] fix calling GlobalParser as static --- include/TServer.h | 2 +- src/TNetwork.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/TServer.h b/include/TServer.h index 01ea940b..16f9412c 100644 --- a/include/TServer.h +++ b/include/TServer.h @@ -26,7 +26,7 @@ class TServer final { void ForEachClient(const std::function)>& Fn); size_t ClientCount() const; - static void GlobalParser(const std::weak_ptr& Client, std::vector&& Packet, TPPSMonitor& PPSMonitor, TNetwork& Network); + void GlobalParser(const std::weak_ptr& Client, std::vector&& Packet, TPPSMonitor& PPSMonitor, TNetwork& Network); static void HandleEvent(TClient& c, const std::string& Data); RWMutex& GetClientMutex() const { return mClientsMutex; } diff --git a/src/TNetwork.cpp b/src/TNetwork.cpp index 529da51f..b82a72a3 100644 --- a/src/TNetwork.cpp +++ b/src/TNetwork.cpp @@ -101,7 +101,7 @@ void TNetwork::UDPServerMain() { Client->SetUDPAddr(client); Client->SetIsConnected(true); Data.erase(Data.begin(), Data.begin() + 2); - TServer::GlobalParser(ClientPtr, std::move(Data), mPPSMonitor, *this); + mServer.GlobalParser(ClientPtr, std::move(Data), mPPSMonitor, *this); } return true; @@ -552,7 +552,7 @@ void TNetwork::TCPClient(const std::weak_ptr& c) { Client->Disconnect("TCPRcv failed"); break; } - TServer::GlobalParser(c, std::move(res), mPPSMonitor, *this); + mServer.GlobalParser(c, std::move(res), mPPSMonitor, *this); } if (QueueSync.joinable())