mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 10:37:02 +00:00
[11483] Change postfix iterator increments to prefix where possible
This commit is contained in:
parent
4cfa51d799
commit
777ffe8dc2
4 changed files with 8 additions and 12 deletions
|
|
@ -1141,14 +1141,10 @@ BattleGroundMgr::~BattleGroundMgr()
|
|||
void BattleGroundMgr::DeleteAllBattleGrounds()
|
||||
{
|
||||
// will also delete template bgs:
|
||||
for(uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
|
||||
for(uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i)
|
||||
{
|
||||
for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end();)
|
||||
{
|
||||
BattleGround * bg = itr->second;
|
||||
itr++;
|
||||
delete bg;
|
||||
}
|
||||
for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end(); ++itr)
|
||||
delete itr->second;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue