fix: resolve infinite recursion, operator precedence bugs, and compiler warnings

- isPreWotlk() was calling itself instead of checking expansion (infinite recursion)
- luaReturnNil/Zero/False were calling themselves instead of pushing Lua values
- hasRemaining(N) * M had wrong operator precedence (should be hasRemaining(N * M))
- Misleading indentation in PARTY_LEADER_CHANGED handler (fireAddonEvent always fires)
- Remove unused standalone hasFullPackedGuid() (superseded by Packet method)
- Suppress unused-parameter warnings in fish/cancel-auto-repeat lambdas
- Remove unused settings default variables
This commit is contained in:
Kelsi 2026-03-27 10:08:22 -07:00
parent 33f8a63c99
commit be694be558
3 changed files with 11 additions and 27 deletions

View file

@ -20,22 +20,6 @@ namespace {
return static_cast<uint16_t>(((v & 0xFF00u) >> 8) | ((v & 0x00FFu) << 8));
}
bool hasFullPackedGuid(const wowee::network::Packet& packet) {
if (!packet.hasData()) {
return false;
}
const auto& rawData = packet.getData();
const uint8_t mask = rawData[packet.getReadPos()];
size_t guidBytes = 1;
for (int bit = 0; bit < 8; ++bit) {
if ((mask & (1u << bit)) != 0) {
++guidBytes;
}
}
return packet.hasRemaining(guidBytes);
}
const char* updateTypeName(wowee::game::UpdateType type) {
using wowee::game::UpdateType;
switch (type) {