Merge pull request #288 from Stoabrogga/warnings

fix some compiler warnings about unused variables
This commit is contained in:
Rochet2
2019-04-03 15:19:07 +03:00
committed by GitHub
3 changed files with 5 additions and 0 deletions

View File

@@ -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<uint32>(L, 2);
uint32 weatherType = Eluna::CHECKVAL<uint32>(L, 3);
float grade = Eluna::CHECKVAL<float>(L, 4);

View File

@@ -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<bool>(L, 2, true);
player->LeaveBattleground(teleToEntryPoint);
@@ -3493,6 +3494,7 @@ namespace LuaPlayer
{
uint32 category = Eluna::CHECKVAL<uint32>(L, 2);
bool update = Eluna::CHECKVAL<bool>(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

View File

@@ -1494,6 +1494,7 @@ namespace LuaUnit
uint32 type = Eluna::CHECKVAL<uint32>(L, 2);
float rate = Eluna::CHECKVAL<float>(L, 3);
bool forced = Eluna::CHECKVAL<bool>(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<const char*>(L, 2);
uint32 lang = Eluna::CHECKVAL<uint32>(L, 3);
(void)lang; // ensure that the variable is referenced in order to pass compiler checks
Player* receiver = Eluna::CHECKOBJ<Player>(L, 4);
bool bossWhisper = Eluna::CHECKVAL<bool>(L, 5, false);
if (std::string(msg).length() > 0)