(svn r22116) -Codechange: use PoolBase::Clean() at more places

This commit is contained in:
smatz
2011-02-19 23:05:47 +00:00
parent 9c40059641
commit c85e1c3089
28 changed files with 37 additions and 117 deletions
+1 -3
View File
@@ -493,9 +493,7 @@ void ParseConnectionString(const char **company, const char **port, char *connec
*/
static void InitializeNetworkPools(bool close_admins = true)
{
_networkclientsocket_pool.CleanPool();
_networkclientinfo_pool.CleanPool();
if (close_admins) _networkadminsocket_pool.CleanPool();
PoolBase::Clean(PT_NCLIENT | (close_admins ? PT_NADMIN : PT_NONE));
}
/**
+1 -1
View File
@@ -21,7 +21,7 @@
extern AdminIndex _redirect_console_to_admin;
class ServerNetworkAdminSocketHandler;
typedef Pool<ServerNetworkAdminSocketHandler, AdminIndex, 2, MAX_ADMINS> NetworkAdminSocketPool;
typedef Pool<ServerNetworkAdminSocketHandler, AdminIndex, 2, MAX_ADMINS, PT_NADMIN> NetworkAdminSocketPool;
extern NetworkAdminSocketPool _networkadminsocket_pool;
/** Class for handling the server side of the game connection. */
+1 -1
View File
@@ -19,7 +19,7 @@
#include "../core/pool_type.hpp"
#include "../company_type.h"
typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS> NetworkClientInfoPool;
typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientInfoPool;
extern NetworkClientInfoPool _networkclientinfo_pool;
struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_pool> {
+1 -1
View File
@@ -20,7 +20,7 @@
class ServerNetworkGameSocketHandler;
typedef ServerNetworkGameSocketHandler NetworkClientSocket;
typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS> NetworkClientSocketPool;
typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientSocketPool;
extern NetworkClientSocketPool _networkclientsocket_pool;
/** Class for handling the server side of the game connection. */