diff options
| author | Shauren <shauren.trinity@gmail.com> | 2011-05-07 19:08:50 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2011-05-07 19:08:50 +0200 |
| commit | 7905200ebaa16171748840f893da0bcea29c2138 (patch) | |
| tree | e79eb198765b128debe1b465da3c4bcab5c91d7c /src/server/game | |
| parent | b82ae5ad0d85990c31405dc489432083330a4b79 (diff) | |
Core: Warning fixes
Diffstat (limited to 'src/server/game')
| -rwxr-xr-x | src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Battlegrounds/Zones/BattlegroundIC.h | 2 | ||||
| -rwxr-xr-x | src/server/game/Chat/Chat.h | 2 | ||||
| -rw-r--r-- | src/server/game/Chat/ChatLink.h | 1 | ||||
| -rwxr-xr-x | src/server/game/OutdoorPvP/OutdoorPvP.h | 4 | ||||
| -rwxr-xr-x | src/server/game/Scripting/ScriptMgr.h | 2 | ||||
| -rwxr-xr-x | src/server/game/Scripting/ScriptSystem.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Scripting/ScriptSystem.h | 8 | ||||
| -rwxr-xr-x | src/server/game/Spells/Auras/SpellAuras.h | 2 |
9 files changed, 20 insertions, 15 deletions
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 9876bb05607..c66679c0e7d 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -85,7 +85,7 @@ void BattlegroundIC::SendTransportInit(Player* player) player->GetSession()->SendPacket(&packet); } -void BattlegroundIC::DoAction(uint32 action, uint64 var) +void BattlegroundIC::DoAction(uint32 action, uint64 const& var) { if (action != ACTION_TELEPORT_PLAYER_TO_TRANSPORT) return; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 282ec5f531a..d2cf410d3d4 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -888,7 +888,7 @@ class BattlegroundIC : public Battleground void FillInitialWorldStates(WorldPacket& data); - virtual void DoAction(uint32 action, uint64 var); + void DoAction(uint32 action, uint64 const& var); virtual void HandlePlayerResurrect(Player* player); diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index 216ce95ad9c..dd845c1c70d 100755 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -49,7 +49,7 @@ class ChatHandler WorldSession * GetSession() { return m_session; } explicit ChatHandler(WorldSession* session) : m_session(session) {} explicit ChatHandler(Player* player) : m_session(player->GetSession()) {} - ~ChatHandler() {} + virtual ~ChatHandler() {} static void FillMessageData(WorldPacket *data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit *speaker); diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index 8ee9171f744..2d9e95d8d33 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -37,6 +37,7 @@ class ChatLink { public: ChatLink() : _color(0), _startPos(0), _endPos(0) { } + virtual ~ChatLink() { } void SetColor(uint32 color) { _color = color; } // This will allow to extract the whole link string from the message, if necessary. void SetBounds(std::istringstream::pos_type startPos, std::istringstream::pos_type endPos) { _startPos = startPos; _endPos = endPos; } diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index 362217b1575..f069dd04cf0 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -93,6 +93,8 @@ class OPvPCapturePoint OPvPCapturePoint(OutdoorPvP * pvp); + virtual ~OPvPCapturePoint() {} + virtual void FillInitialWorldStates(WorldPacket & /*data*/) {} // send world state update to all players present @@ -196,7 +198,7 @@ class OutdoorPvP : public ZoneScript OutdoorPvP(); // dtor - ~OutdoorPvP(); + virtual ~OutdoorPvP(); // deletes all gos/creatures spawned by the pvp void DeleteSpawns(); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 4064c8b08f6..28d21ae0645 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -238,7 +238,7 @@ class ServerScript : public ScriptObject virtual void OnUnknownPacketReceive(WorldSocket* /*socket*/, WorldPacket& /*packet*/) { } }; -class WorldScript : public ScriptObject, public UpdatableScript<void> +class WorldScript : public ScriptObject { protected: diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index 40e5e64af1a..ef5a3b8184f 100755 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -21,16 +21,18 @@ #include "ObjectMgr.h" #include "DatabaseEnv.h" +ScriptPointVector const SystemMgr::_empty; + void SystemMgr::LoadVersion() { - //Get Version information - QueryResult Result = WorldDatabase.Query("SELECT script_version FROM version LIMIT 1"); + // Get Version information + QueryResult result = WorldDatabase.Query("SELECT script_version FROM version LIMIT 1"); - if (Result) + if (result) { - Field* pFields = Result->Fetch(); + Field* fields = result->Fetch(); - sLog->outString("TSCR: Database version is: %s", pFields[0].GetCString()); + sLog->outString("TSCR: Database version is: %s", fields[0].GetCString()); sLog->outString(); } else diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h index 1fb84977e5d..a17033dc920 100644 --- a/src/server/game/Scripting/ScriptSystem.h +++ b/src/server/game/Scripting/ScriptSystem.h @@ -82,20 +82,20 @@ class SystemMgr ScriptPointVector const& GetPointMoveList(uint32 creatureEntry) const { - static ScriptPointVector empty; - PointMoveMap::const_iterator itr = m_mPointMoveMap.find(creatureEntry); if (itr == m_mPointMoveMap.end()) - return empty; + return _empty; return itr->second; } protected: - TextDataMap m_mTextDataMap; //additional data for text strings PointMoveMap m_mPointMoveMap; //coordinates for waypoints + + private: + static ScriptPointVector const _empty; }; #define sScriptSystemMgr ACE_Singleton<SystemMgr, ACE_Null_Mutex>::instance() diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index ca49faae982..09faf50ef67 100755 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -86,7 +86,7 @@ class Aura static Aura * Create(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount = NULL, Item * castItem = NULL, uint64 casterGUID = 0); explicit Aura(SpellEntry const* spellproto, WorldObject * owner, Unit * caster, Item * castItem, uint64 casterGUID); void _InitEffects(uint8 effMask, Unit * caster, int32 *baseAmount); - ~Aura(); + virtual ~Aura(); SpellEntry const* GetSpellProto() const { return m_spellProto; } uint32 GetId() const{ return GetSpellProto()->Id; } |
