From 2c7b3bb55d87b7b93dabebde1e44f102de2c153c Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 1 Feb 2025 10:23:36 +0100 Subject: [PATCH] Codechange: rename ClientIndex to ClientPoolID --- src/company_cmd.cpp | 2 +- src/network/network_base.h | 2 +- src/network/network_server.h | 2 +- src/network/network_type.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 061049d711..49e1727750 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -872,7 +872,7 @@ CommandCost CmdCompanyCtrl(DoCommandFlag flags, CompanyCtrlAction cca, CompanyID /* This command is only executed in a multiplayer game */ if (!_networking) return CMD_ERROR; - /* Has the network client a correct ClientIndex? */ + /* Has the network client a correct ClientID? */ if (!(flags & DC_EXEC)) return CommandCost(); NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(client_id); diff --git a/src/network/network_base.h b/src/network/network_base.h index 497db78398..cd5a6f684f 100644 --- a/src/network/network_base.h +++ b/src/network/network_base.h @@ -17,7 +17,7 @@ #include "../timer/timer_game_economy.h" /** Type for the pool with client information. */ -typedef Pool NetworkClientInfoPool; +using NetworkClientInfoPool = Pool; extern NetworkClientInfoPool _networkclientinfo_pool; /** Container for all information known about a client. */ diff --git a/src/network/network_server.h b/src/network/network_server.h index 05d3f7bb10..6e9a8ba874 100644 --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -17,7 +17,7 @@ class ServerNetworkGameSocketHandler; /** Make the code look slightly nicer/simpler. */ typedef ServerNetworkGameSocketHandler NetworkClientSocket; /** Pool with all client sockets. */ -typedef Pool NetworkClientSocketPool; +using NetworkClientSocketPool = Pool; extern NetworkClientSocketPool _networkclientsocket_pool; /** Class for handling the server side of the game connection. */ diff --git a/src/network/network_type.h b/src/network/network_type.h index eca76a73a5..fe609e72e5 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -52,8 +52,8 @@ enum ClientID : uint32_t { CLIENT_ID_FIRST = 2, ///< The first client ID }; -/** Indices into the client tables */ -typedef uint8_t ClientIndex; +/** Indices into the client related pools */ +typedef uint8_t ClientPoolID; /** Indices into the admin tables. */ typedef uint8_t AdminID;