From 4dd7610381c5a9cbd29b771e6c98b5d500774ac6 Mon Sep 17 00:00:00 2001 From: jfhumann Date: Sat, 19 Apr 2014 17:53:02 +0200 Subject: Declared one mutex as mutable in order to allow for const correct get accessors. --- src/Server.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Server.h') diff --git a/src/Server.h b/src/Server.h index b5c384a44..51c450ebd 100644 --- a/src/Server.h +++ b/src/Server.h @@ -59,7 +59,7 @@ public: // tolua_export // Player counts: int GetMaxPlayers(void) const {return m_MaxPlayers; } - int GetNumPlayers(void); + int GetNumPlayers(void) const; void SetMaxPlayers(int a_MaxPlayers) { m_MaxPlayers = a_MaxPlayers; } // Hardcore mode or not: @@ -168,7 +168,7 @@ private: cClientHandleList m_Clients; ///< Clients that are connected to the server and not yet assigned to a cWorld cClientHandleList m_ClientsToRemove; ///< Clients that have just been moved into a world and are to be removed from m_Clients in the next Tick() - cCriticalSection m_CSPlayerCount; ///< Locks the m_PlayerCount + mutable cCriticalSection m_CSPlayerCount; ///< Locks the m_PlayerCount int m_PlayerCount; ///< Number of players currently playing in the server cCriticalSection m_CSPlayerCountDiff; ///< Locks the m_PlayerCountDiff int m_PlayerCountDiff; ///< Adjustment to m_PlayerCount to be applied in the Tick thread -- cgit v1.2.3