Skip to content

Commit

Permalink
fix calling GlobalParser as static
Browse files Browse the repository at this point in the history
  • Loading branch information
lionkor committed Jan 8, 2024
1 parent a70b603 commit 3297c1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/TServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TServer final {
void ForEachClient(const std::function<bool(std::weak_ptr<TClient>)>& Fn);
size_t ClientCount() const;

static void GlobalParser(const std::weak_ptr<TClient>& Client, std::vector<uint8_t>&& Packet, TPPSMonitor& PPSMonitor, TNetwork& Network);
void GlobalParser(const std::weak_ptr<TClient>& Client, std::vector<uint8_t>&& Packet, TPPSMonitor& PPSMonitor, TNetwork& Network);
static void HandleEvent(TClient& c, const std::string& Data);
RWMutex& GetClientMutex() const { return mClientsMutex; }

Expand Down
4 changes: 2 additions & 2 deletions src/TNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -552,7 +552,7 @@ void TNetwork::TCPClient(const std::weak_ptr<TClient>& 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())
Expand Down

0 comments on commit 3297c1c

Please sign in to comment.