1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

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

This commit is contained in:
smatz
2011-02-19 23:05:47 +00:00
parent 642fb19d4f
commit 756cc6cf65
28 changed files with 37 additions and 117 deletions

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));
}
/**

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. */

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> {

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. */