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

@ -26,9 +26,9 @@ static void toLowerInPlace(std::string& s) {
}
// Lua return helpers — used 200+ times as guard/fallback returns
static int luaReturnNil(lua_State* L) { return luaReturnNil(L); }
static int luaReturnZero(lua_State* L) { return luaReturnZero(L); }
static int luaReturnFalse(lua_State* L){ return luaReturnFalse(L); }
static int luaReturnNil(lua_State* L) { lua_pushnil(L); return 1; }
static int luaReturnZero(lua_State* L) { lua_pushnumber(L, 0); return 1; }
static int luaReturnFalse(lua_State* L){ lua_pushboolean(L, 0); return 1; }
// Shared GetTime() epoch — all time-returning functions must use this same origin
// so that addon calculations like (start + duration - GetTime()) are consistent.