Codechange: Use EnumBitSet for pool types
This commit is contained in:
@@ -582,7 +582,9 @@ NetworkAddress ParseConnectionString(const std::string &connection_string, uint1
|
||||
*/
|
||||
static void InitializeNetworkPools(bool close_admins = true)
|
||||
{
|
||||
PoolBase::Clean(PT_NCLIENT | (close_admins ? PT_NADMIN : PT_NONE));
|
||||
PoolTypes to_clean{PoolType::NetworkClient};
|
||||
if (close_admins) to_clean.Set(PoolType::NetworkAdmin);
|
||||
PoolBase::Clean(to_clean);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ extern AdminID _redirect_console_to_admin;
|
||||
|
||||
class ServerNetworkAdminSocketHandler;
|
||||
/** Pool with all admin connections. */
|
||||
typedef Pool<ServerNetworkAdminSocketHandler, AdminID, 2, 16, PT_NADMIN> NetworkAdminSocketPool;
|
||||
using NetworkAdminSocketPool = Pool<ServerNetworkAdminSocketHandler, AdminID, 2, 16, PoolType::NetworkAdmin>;
|
||||
extern NetworkAdminSocketPool _networkadminsocket_pool;
|
||||
|
||||
/** Class for handling the server side of the game connection. */
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "../timer/timer_game_economy.h"
|
||||
|
||||
/** Type for the pool with client information. */
|
||||
using NetworkClientInfoPool = Pool<NetworkClientInfo, ClientPoolID, 8, MAX_CLIENT_SLOTS, PT_NCLIENT>;
|
||||
using NetworkClientInfoPool = Pool<NetworkClientInfo, ClientPoolID, 8, MAX_CLIENT_SLOTS, PoolType::NetworkClient>;
|
||||
extern NetworkClientInfoPool _networkclientinfo_pool;
|
||||
|
||||
/** Container for all information known about a client. */
|
||||
|
||||
@@ -17,7 +17,7 @@ class ServerNetworkGameSocketHandler;
|
||||
/** Make the code look slightly nicer/simpler. */
|
||||
typedef ServerNetworkGameSocketHandler NetworkClientSocket;
|
||||
/** Pool with all client sockets. */
|
||||
using NetworkClientSocketPool = Pool<NetworkClientSocket, ClientPoolID, 8, MAX_CLIENT_SLOTS, PT_NCLIENT>;
|
||||
using NetworkClientSocketPool = Pool<NetworkClientSocket, ClientPoolID, 8, MAX_CLIENT_SLOTS, PoolType::NetworkClient>;
|
||||
extern NetworkClientSocketPool _networkclientsocket_pool;
|
||||
|
||||
/** Class for handling the server side of the game connection. */
|
||||
|
||||
Reference in New Issue
Block a user