diff --git a/src/network/network_admin.h b/src/network/network_admin.h index 9beaf8eeff..9d16b8e373 100644 --- a/src/network/network_admin.h +++ b/src/network/network_admin.h @@ -18,7 +18,7 @@ extern AdminID _redirect_console_to_admin; class ServerNetworkAdminSocketHandler; /** Pool with all admin connections. */ -using NetworkAdminSocketPool = Pool; +using NetworkAdminSocketPool = Pool; extern NetworkAdminSocketPool _networkadminsocket_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 fe609e72e5..2b7fd96501 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -11,6 +11,7 @@ #define NETWORK_TYPE_H #include "../core/enum_type.hpp" +#include "../core/pool_type.hpp" /** How many clients can we have */ static const uint MAX_CLIENTS = 255; @@ -56,10 +57,10 @@ enum ClientID : uint32_t { typedef uint8_t ClientPoolID; /** Indices into the admin tables. */ -typedef uint8_t AdminID; +using AdminID = PoolID; /** An invalid admin marker. */ -static const AdminID INVALID_ADMIN_ID = UINT8_MAX; +static constexpr AdminID INVALID_ADMIN_ID = AdminID::Invalid(); /** Simple calculated statistics of a company */ struct NetworkCompanyStats {