mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-14 00:23:50 +00:00
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:
parent
33f8a63c99
commit
be694be558
3 changed files with 11 additions and 27 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue