mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
refactor: remaining C-style casts, color constants, and header guard cleanup
Replace ~37 remaining C-style casts with static_cast across 16 files. Extract named color constants (kColorRed/Green/Yellow/Gray) and dialog window flags (kDialogFlags) in game_screen.cpp, replacing 72 inline literals. Normalize keybinding_manager.hpp to #pragma once.
This commit is contained in:
parent
05f2bedf88
commit
ba99d505dd
18 changed files with 120 additions and 114 deletions
|
|
@ -185,7 +185,7 @@ void TCPSocket::tryParsePackets() {
|
|||
|
||||
if (expectedSize == 0) {
|
||||
// Unknown opcode or need more data to determine size
|
||||
LOG_WARNING("Unknown opcode or indeterminate size: 0x", std::hex, (int)opcode, std::dec);
|
||||
LOG_WARNING("Unknown opcode or indeterminate size: 0x", std::hex, static_cast<int>(opcode), std::dec);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ void TCPSocket::tryParsePackets() {
|
|||
}
|
||||
|
||||
// We have a complete packet!
|
||||
LOG_DEBUG("Parsing packet: opcode=0x", std::hex, (int)opcode, std::dec,
|
||||
LOG_DEBUG("Parsing packet: opcode=0x", std::hex, static_cast<int>(opcode), std::dec,
|
||||
" size=", expectedSize, " bytes");
|
||||
|
||||
// Create packet from buffer data
|
||||
|
|
@ -285,7 +285,7 @@ size_t TCPSocket::getExpectedPacketSize(uint8_t opcode) {
|
|||
return 0; // Need more data to read size field
|
||||
|
||||
default:
|
||||
LOG_WARNING("Unknown auth packet opcode: 0x", std::hex, (int)opcode, std::dec);
|
||||
LOG_WARNING("Unknown auth packet opcode: 0x", std::hex, static_cast<int>(opcode), std::dec);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue