aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGround.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-06 17:45:37 -0500
committermegamage <none@none>2009-08-06 17:45:37 -0500
commit7f8ce1d80950b2bd680d0f8cc8ad44e4835e0d1a (patch)
treec351b74f6b247e0edc25a4e566c011ac3717a1e7 /src/game/BattleGround.h
parente8556b879d36ad8899d6eb40e98f6de6d420a275 (diff)
[8315] Fixed memory leaks (mostly at server shutdown) and code cleanups. Author: VladimirMangos
* Fixed leak in BattleGround::m_PlayerScores at BattleGround::Reset, add and use BattleGroundScoreMap typedef * Delete AreaTeam objects stored in global map at shutdown * Delete Corpse objects stored in global map at shutdown * Store guild bank log entries as objectes instead pointers in log event lists --HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGround.h')
-rw-r--r--src/game/BattleGround.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h
index 07f2643fd17..4ed660a3595 100644
--- a/src/game/BattleGround.h
+++ b/src/game/BattleGround.h
@@ -384,8 +384,9 @@ class BattleGround
BattleGroundPlayerMap const& GetPlayers() const { return m_Players; }
uint32 GetPlayersSize() const { return m_Players.size(); }
- std::map<uint64, BattleGroundScore*>::const_iterator GetPlayerScoresBegin() const { return m_PlayerScores.begin(); }
- std::map<uint64, BattleGroundScore*>::const_iterator GetPlayerScoresEnd() const { return m_PlayerScores.end(); }
+ typedef std::map<uint64, BattleGroundScore*> BattleGroundScoreMap;
+ BattleGroundScoreMap::const_iterator GetPlayerScoresBegin() const { return m_PlayerScores.begin(); }
+ BattleGroundScoreMap::const_iterator GetPlayerScoresEnd() const { return m_PlayerScores.end(); }
uint32 GetPlayerScoresSize() const { return m_PlayerScores.size(); }
uint32 GetReviveQueueSize() const { return m_ReviveQueue.size(); }
@@ -530,8 +531,8 @@ class BattleGround
void PlayerAddedToBGCheckIfBGIsRunning(Player* plr);
/* Scorekeeping */
- // Player scores
- std::map<uint64, BattleGroundScore*> m_PlayerScores;
+
+ BattleGroundScoreMap m_PlayerScores; // Player scores
// must be implemented in BG subclass
virtual void RemovePlayer(Player * /*player*/, uint64 /*guid*/) {}