From 790c5cb455d34e6095e11e7b301b0e0536ca80e3 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Tue, 24 Jun 2025 18:28:40 +0300 Subject: [PATCH] Remove static variable --- client/Client.cpp | 2 -- client/Client.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/client/Client.cpp b/client/Client.cpp index d42a04e3e..5630f0625 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -363,8 +363,6 @@ std::optional CClient::makeSurrenderRetreatDecision(PlayerColor pl int CClient::sendRequest(const CPackForServer & request, PlayerColor player, bool waitTillRealize) { - static ui32 requestCounter = 1; - ui32 requestID = requestCounter++; logNetwork->trace("Sending a request \"%s\". It'll have an ID=%d.", typeid(request).name(), requestID); diff --git a/client/Client.h b/client/Client.h index 520dbdecd..39c093dfb 100644 --- a/client/Client.h +++ b/client/Client.h @@ -125,6 +125,7 @@ public: class CClient : public Environment, public IClient { std::shared_ptr gamestate; + int requestCounter = 1; public: std::map> playerint; std::map> battleints;