mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-23 19:46:34 +00:00
Codechange: enum-class-ify Commands
This commit is contained in:
@@ -575,7 +575,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCmdNames()
|
||||
{
|
||||
auto p = std::make_unique<Packet>(this, ADMIN_PACKET_SERVER_CMD_NAMES);
|
||||
|
||||
for (uint16_t i = 0; i < CMD_END; i++) {
|
||||
for (uint16_t i = 0; i < to_underlying(Commands::End); i++) {
|
||||
std::string_view cmdname = GetCommandName(static_cast<Commands>(i));
|
||||
|
||||
/* Should COMPAT_MTU be exceeded, start a new packet
|
||||
@@ -611,7 +611,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCmdLogging(ClientID clien
|
||||
|
||||
p->Send_uint32(client_id);
|
||||
p->Send_uint8 (cp.company);
|
||||
p->Send_uint16(cp.cmd);
|
||||
p->Send_uint16(to_underlying(cp.cmd));
|
||||
p->Send_buffer(cp.data);
|
||||
p->Send_uint32(cp.frame);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user