From 6f28bd9c6459a38521bff7f10e3736a2450b6561 Mon Sep 17 00:00:00 2001 From: Stoabrogga <38475780+Stoabrogga@users.noreply.github.com> Date: Wed, 3 Apr 2019 09:17:24 +0000 Subject: [PATCH] fix some compiler warnings about unused variables --- MapMethods.h | 1 + PlayerMethods.h | 2 ++ UnitMethods.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/MapMethods.h b/MapMethods.h index 8594863..1f954b2 100644 --- a/MapMethods.h +++ b/MapMethods.h @@ -263,6 +263,7 @@ namespace LuaMap */ int SetWeather(lua_State* L, Map* map) { + (void)map; // ensure that the variable is referenced in order to pass compiler checks uint32 zoneId = Eluna::CHECKVAL(L, 2); uint32 weatherType = Eluna::CHECKVAL(L, 3); float grade = Eluna::CHECKVAL(L, 4); diff --git a/PlayerMethods.h b/PlayerMethods.h index b3ac38b..783bee2 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -2474,6 +2474,7 @@ namespace LuaPlayer */ int LeaveBattleground(lua_State* L, Player* player) { + (void)L; // ensure that the variable is referenced in order to pass compiler checks #ifndef AZEROTHCORE bool teleToEntryPoint = Eluna::CHECKVAL(L, 2, true); player->LeaveBattleground(teleToEntryPoint); @@ -3493,6 +3494,7 @@ namespace LuaPlayer { uint32 category = Eluna::CHECKVAL(L, 2); bool update = Eluna::CHECKVAL(L, 3, true); + (void)update; // ensure that the variable is referenced in order to pass compiler checks #ifdef TRINITY player->GetSpellHistory()->ResetCooldowns([category](SpellHistory::CooldownStorageType::iterator itr) -> bool diff --git a/UnitMethods.h b/UnitMethods.h index 937cc98..5a6d4ca 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -1494,6 +1494,7 @@ namespace LuaUnit uint32 type = Eluna::CHECKVAL(L, 2); float rate = Eluna::CHECKVAL(L, 3); bool forced = Eluna::CHECKVAL(L, 4, false); + (void)forced; // ensure that the variable is referenced in order to pass compiler checks if (type >= MAX_MOVE_TYPE) return luaL_argerror(L, 2, "valid UnitMoveType expected"); #if defined TRINITY || AZEROTHCORE @@ -2276,6 +2277,7 @@ namespace LuaUnit { const char* msg = Eluna::CHECKVAL(L, 2); uint32 lang = Eluna::CHECKVAL(L, 3); + (void)lang; // ensure that the variable is referenced in order to pass compiler checks Player* receiver = Eluna::CHECKOBJ(L, 4); bool bossWhisper = Eluna::CHECKVAL(L, 5, false); if (std::string(msg).length() > 0)