Fix linux build and warnings

This commit is contained in:
Rochet2
2014-12-19 15:16:02 +02:00
parent 78d18e8fee
commit dcd0a0e89c
9 changed files with 22 additions and 25 deletions

View File

@@ -59,7 +59,7 @@ namespace LuaCorpse
* Resets the [Corpse] ghost time.
*
*/
int ResetGhostTime(Eluna* /*E*/, lua_State* L, Corpse* corpse)
int ResetGhostTime(Eluna* /*E*/, lua_State* /*L*/, Corpse* corpse)
{
corpse->ResetGhostTime();
return 0;
@@ -69,7 +69,7 @@ namespace LuaCorpse
* Saves the [Corpse] to the database.
*
*/
int SaveToDB(Eluna* /*E*/, lua_State* L, Corpse* corpse)
int SaveToDB(Eluna* /*E*/, lua_State* /*L*/, Corpse* corpse)
{
corpse->SaveToDB();
return 0;
@@ -79,7 +79,7 @@ namespace LuaCorpse
* Deletes the [Corpse] from the world.
*
*/
int DeleteBonesFromWorld(Eluna* /*E*/, lua_State* L, Corpse* corpse)
int DeleteBonesFromWorld(Eluna* /*E*/, lua_State* /*L*/, Corpse* corpse)
{
corpse->DeleteBonesFromWorld();
return 0;

View File

@@ -65,7 +65,6 @@ public:
private:
void RemoveEvents_internal();
void AddEvent(LuaEvent* Event);
bool removeAllEvents;
EventList eventList;
uint64 m_time;
WorldObject* obj;

View File

@@ -2010,7 +2010,7 @@ namespace LuaGlobalFunctions
* Removes old [Corpse]s from the world
*
*/
int RemoveOldCorpses(Eluna* /*E*/, lua_State* L)
int RemoveOldCorpses(Eluna* /*E*/, lua_State* /*L*/)
{
eObjectAccessor->RemoveOldCorpses();
return 0;

View File

@@ -47,7 +47,6 @@ using namespace HookMgr;
if (!BINDMAP->HasEvents(EVENT)) \
RET; \
lua_State* L = this->L; \
ElunaBind* _LuaBind = this->BINDMAP; \
const char* _LuaBindType = this->BINDMAP->groupName; \
uint32 _LuaEvent = EVENT; \
int _LuaStackTop = lua_gettop(L); \
@@ -81,8 +80,7 @@ using namespace HookMgr;
if (!BINDMAP->HasEvents(ENTRY, EVENT)) \
RET; \
lua_State* L = this->L; \
ElunaBind* _LuaBind = this->BINDMAP; \
const char* _LuaBindType = _LuaBind->groupName; \
const char* _LuaBindType = this->BINDMAP->groupName; \
uint32 _LuaEvent = EVENT; \
int _LuaStackTop = lua_gettop(L); \
this->BINDMAP->PushFuncRefs(L, _LuaEvent, ENTRY); \

View File

@@ -680,7 +680,7 @@ template<> Object* Eluna::CHECKOBJ<Object>(lua_State* L, int narg, bool error)
if (!obj)
obj = CHECKOBJ<Item>(L, narg, false);
if (!obj)
obj = ElunaTemplate<Object>::Check(L, narg, false);
obj = ElunaTemplate<Object>::Check(L, narg, error);
return obj;
}
template<> WorldObject* Eluna::CHECKOBJ<WorldObject>(lua_State* L, int narg, bool error)
@@ -691,7 +691,7 @@ template<> WorldObject* Eluna::CHECKOBJ<WorldObject>(lua_State* L, int narg, boo
if (!obj)
obj = CHECKOBJ<Corpse>(L, narg, false);
if (!obj)
obj = ElunaTemplate<WorldObject>::Check(L, narg, false);
obj = ElunaTemplate<WorldObject>::Check(L, narg, error);
return obj;
}
template<> Unit* Eluna::CHECKOBJ<Unit>(lua_State* L, int narg, bool error)
@@ -700,7 +700,7 @@ template<> Unit* Eluna::CHECKOBJ<Unit>(lua_State* L, int narg, bool error)
if (!obj)
obj = CHECKOBJ<Creature>(L, narg, false);
if (!obj)
obj = ElunaTemplate<Unit>::Check(L, narg, false);
obj = ElunaTemplate<Unit>::Check(L, narg, error);
return obj;
}

View File

@@ -1279,7 +1279,7 @@ template<> int ElunaTemplate<unsigned long long>::Less(lua_State* L) { Eluna::Pu
template<> int ElunaTemplate<unsigned long long>::LessOrEqual(lua_State* L) { Eluna::Push(L, Eluna::CHECKVAL<unsigned long long>(L, 1) <= Eluna::CHECKVAL<unsigned long long>(L, 2)); return 1; }
template<> int ElunaTemplate<unsigned long long>::Pow(lua_State* L)
{
Eluna::Push(L, static_cast<unsigned long long>(std::powl(static_cast<long double>(Eluna::CHECKVAL<unsigned long long>(L, 1)), static_cast<long double>(Eluna::CHECKVAL<unsigned long long>(L, 2)))));
Eluna::Push(L, static_cast<unsigned long long>(powl(static_cast<long double>(Eluna::CHECKVAL<unsigned long long>(L, 1)), static_cast<long double>(Eluna::CHECKVAL<unsigned long long>(L, 2)))));
return 1;
}
template<> int ElunaTemplate<unsigned long long>::ToString(lua_State* L)
@@ -1302,7 +1302,7 @@ template<> int ElunaTemplate<long long>::Less(lua_State* L) { Eluna::Push(L, Elu
template<> int ElunaTemplate<long long>::LessOrEqual(lua_State* L) { Eluna::Push(L, Eluna::CHECKVAL<long long>(L, 1) <= Eluna::CHECKVAL<long long>(L, 2)); return 1; }
template<> int ElunaTemplate<long long>::Pow(lua_State* L)
{
Eluna::Push(L, static_cast<long long>(std::powl(static_cast<long double>(Eluna::CHECKVAL<long long>(L, 1)), static_cast<long double>(Eluna::CHECKVAL<long long>(L, 2)))));
Eluna::Push(L, static_cast<long long>(powl(static_cast<long double>(Eluna::CHECKVAL<long long>(L, 1)), static_cast<long double>(Eluna::CHECKVAL<long long>(L, 2)))));
return 1;
}
template<> int ElunaTemplate<long long>::ToString(lua_State* L)

View File

@@ -1317,7 +1317,7 @@ namespace LuaPlayer
/* OTHER */
#if (!defined(TBC) && !defined(CLASSIC))
int ResetPetTalents(Eluna* /*E*/, lua_State* L, Player* player)
int ResetPetTalents(Eluna* /*E*/, lua_State* /*L*/, Player* player)
{
#ifndef TRINITY
Pet* pet = player->GetPet();
@@ -1331,7 +1331,7 @@ namespace LuaPlayer
return 0;
}
int ResetAchievements(Eluna* /*E*/, lua_State* L, Player* player)
int ResetAchievements(Eluna* /*E*/, lua_State* /*L*/, Player* player)
{
#ifndef TRINITY
player->GetAchievementMgr().Reset();

View File

@@ -1212,7 +1212,7 @@ namespace LuaUnit
}*/
/* OTHER */
int ClearThreatList(Eluna* /*E*/, lua_State* L, Unit* unit)
int ClearThreatList(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
#ifdef MANGOS
unit->GetThreatManager().clearReferences();
@@ -1230,7 +1230,7 @@ namespace LuaUnit
return 0;
}
int Dismount(Eluna* /*E*/, lua_State* L, Unit* unit)
int Dismount(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
if (unit->IsMounted())
{
@@ -1293,7 +1293,7 @@ namespace LuaUnit
// unit->GetMotionMaster()->Clear(); // all
// }
int MoveStop(Eluna* /*E*/, lua_State* L, Unit* unit)
int MoveStop(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
unit->StopMoving();
return 0;
@@ -1313,7 +1313,7 @@ namespace LuaUnit
return 0;
}
int MoveIdle(Eluna* /*E*/, lua_State* L, Unit* unit)
int MoveIdle(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
unit->GetMotionMaster()->MoveIdle();
return 0;
@@ -1332,7 +1332,7 @@ namespace LuaUnit
return 0;
}
int MoveHome(Eluna* /*E*/, lua_State* L, Unit* unit)
int MoveHome(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
unit->GetMotionMaster()->MoveTargetedHome();
return 0;
@@ -1356,7 +1356,7 @@ namespace LuaUnit
return 0;
}
int MoveConfused(Eluna* /*E*/, lua_State* L, Unit* unit)
int MoveConfused(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
unit->GetMotionMaster()->MoveConfused();
return 0;
@@ -1450,7 +1450,7 @@ namespace LuaUnit
return 0;
}
int DeMorph(Eluna* /*E*/, lua_State* L, Unit* unit)
int DeMorph(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
unit->DeMorph();
return 0;
@@ -1511,7 +1511,7 @@ namespace LuaUnit
return 0;
}
int ClearInCombat(Eluna* /*E*/, lua_State* L, Unit* unit)
int ClearInCombat(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
unit->ClearInCombat();
return 0;
@@ -1591,7 +1591,7 @@ namespace LuaUnit
return 0;
}
int RemoveAllAuras(Eluna* /*E*/, lua_State* L, Unit* unit)
int RemoveAllAuras(Eluna* /*E*/, lua_State* /*L*/, Unit* unit)
{
unit->RemoveAllAuras();
return 0;

View File

@@ -653,7 +653,7 @@ namespace LuaWorldObject
* Removes all timed events from a [WorldObject]
*
*/
int RemoveEvents(Eluna* /*E*/, lua_State* L, WorldObject* obj)
int RemoveEvents(Eluna* /*E*/, lua_State* /*L*/, WorldObject* obj)
{
obj->elunaEvents->RemoveEvents();
return 0;