mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[6884] Replaced iterator++ with ++iterator in for-loop-headers
i used this script
for i in ls *.[ch]*; do cat $i | sed -r 's/(.*for.*iterator.*;\
*)([a-z0-9\_\*]+)\ *\+\+(.*)/\1++\2\3/' > /tmp/mangos/$i; done
for i in ls *.[ch]*; do cp /tmp/mangos/$i $i; done
and rechecked it with my eyes, if everything is right
i took only for-loops cause they can be gathered easier with a script
Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
66c98859cf
commit
2e08a63da7
14 changed files with 40 additions and 40 deletions
|
|
@ -2390,7 +2390,7 @@ void Player::SendInitialSpells()
|
|||
|
||||
uint16 spellCooldowns = m_spellCooldowns.size();
|
||||
data << uint16(spellCooldowns);
|
||||
for(SpellCooldowns::const_iterator itr=m_spellCooldowns.begin(); itr!=m_spellCooldowns.end(); itr++)
|
||||
for(SpellCooldowns::const_iterator itr=m_spellCooldowns.begin(); itr!=m_spellCooldowns.end(); ++itr)
|
||||
{
|
||||
SpellEntry const *sEntry = sSpellStore.LookupEntry(itr->first);
|
||||
if(!sEntry)
|
||||
|
|
@ -3212,7 +3212,7 @@ bool Player::_removeSpell(uint16 spell_id)
|
|||
|
||||
Mail* Player::GetMail(uint32 id)
|
||||
{
|
||||
for(PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); itr++)
|
||||
for(PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->messageID == id)
|
||||
{
|
||||
|
|
@ -5400,7 +5400,7 @@ void Player::SendInitialReputations()
|
|||
|
||||
RepListID a = 0;
|
||||
|
||||
for (FactionStateList::const_iterator itr = m_factions.begin(); itr != m_factions.end(); itr++)
|
||||
for (FactionStateList::const_iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
|
||||
{
|
||||
// fill in absent fields
|
||||
for (; a != itr->first; a++)
|
||||
|
|
@ -6353,7 +6353,7 @@ void Player::DuelComplete(DuelCompleteType type)
|
|||
/* remove auras */
|
||||
std::vector<uint32> auras2remove;
|
||||
AuraMap const& vAuras = duel->opponent->GetAuras();
|
||||
for (AuraMap::const_iterator i = vAuras.begin(); i != vAuras.end(); i++)
|
||||
for (AuraMap::const_iterator i = vAuras.begin(); i != vAuras.end(); ++i)
|
||||
{
|
||||
if (!i->second->IsPositive() && i->second->GetCasterGUID() == GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
||||
auras2remove.push_back(i->second->GetId());
|
||||
|
|
@ -6364,7 +6364,7 @@ void Player::DuelComplete(DuelCompleteType type)
|
|||
|
||||
auras2remove.clear();
|
||||
AuraMap const& auras = GetAuras();
|
||||
for (AuraMap::const_iterator i = auras.begin(); i != auras.end(); i++)
|
||||
for (AuraMap::const_iterator i = auras.begin(); i != auras.end(); ++i)
|
||||
{
|
||||
if (!i->second->IsPositive() && i->second->GetCasterGUID() == duel->opponent->GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
||||
auras2remove.push_back(i->second->GetId());
|
||||
|
|
@ -14662,13 +14662,13 @@ void Player::SendRaidInfo()
|
|||
|
||||
uint32 counter = 0, i;
|
||||
for(i = 0; i < TOTAL_DIFFICULTIES; i++)
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); itr++)
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
|
||||
if(itr->second.perm) counter++;
|
||||
|
||||
data << counter;
|
||||
for(i = 0; i < TOTAL_DIFFICULTIES; i++)
|
||||
{
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); itr++)
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
|
||||
{
|
||||
if(itr->second.perm)
|
||||
{
|
||||
|
|
@ -15165,7 +15165,7 @@ void Player::_SaveMail()
|
|||
if (!m_mailsLoaded)
|
||||
return;
|
||||
|
||||
for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); itr++)
|
||||
for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
|
||||
{
|
||||
Mail *m = (*itr);
|
||||
if (m->state == MAIL_STATE_CHANGED)
|
||||
|
|
@ -15846,7 +15846,7 @@ void Player::PetSpellInitialize()
|
|||
|
||||
if(pet->isControlled() && (pet->getPetType() == HUNTER_PET || cinfo && cinfo->type == CREATURE_TYPE_DEMON && getClass() == CLASS_WARLOCK))
|
||||
{
|
||||
for(PetSpellMap::iterator itr = pet->m_spells.begin();itr != pet->m_spells.end();itr++)
|
||||
for(PetSpellMap::iterator itr = pet->m_spells.begin();itr != pet->m_spells.end();++itr)
|
||||
{
|
||||
if(itr->second->state == PETSPELL_REMOVED)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue