diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-02-23 20:43:37 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-02-23 20:43:37 +0100 |
commit | 50e0c39f84b47a03b3c59b93d754936b6ba0ac89 (patch) | |
tree | 23f154987b03b029791412260e152b1377d6d834 | |
parent | 36102005c4a2680dd1e8d2a80f0fd0a430a22e78 (diff) |
Core/Battlegrounds: Fix invalidated iterator crash
Partially revert e1bee86ee6f5c3ab7b1da6d1b54c98c2851f11ec and restore 9ba3d07fc22864daa51b2faf327ac3336569e463 to store battleground queues as std::list instead of std::deque because deque::erase() invalidates all iterators.
-rw-r--r-- | src/server/game/Battlegrounds/BattlegroundQueue.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h index 37c7928b3de..af283cb825f 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.h +++ b/src/server/game/Battlegrounds/BattlegroundQueue.h @@ -88,8 +88,8 @@ class BattlegroundQueue typedef std::map<uint64, PlayerQueueInfo> QueuedPlayersMap; QueuedPlayersMap m_QueuedPlayers; - //we need constant add to begin and constant remove / add from the end, therefore deque suits our problem well - typedef std::deque<GroupQueueInfo*> GroupsQueueType; + //do NOT use deque because deque.erase() invalidates ALL iterators + typedef std::list<GroupQueueInfo*> GroupsQueueType; /* This two dimensional array is used to store All queued groups |