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:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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. */
|
||||
|
@@ -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> {
|
||||
|
@@ -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. */
|
||||
|
Reference in New Issue
Block a user