Core/Misc: Multiple static analysis issues fixed (small optimizations and clear code)

This commit is contained in:
DDuarte committed 2014-09-19 03:30:02 +01:00
1 parent e6b7de8c97
commit cefcde9ba9
40 files changed
+72 -84

No files matched your search

+2 -2
View File
@@ -448,11 +448,11 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
// over AuraEffectList caused "incompatible iterator" errors on second pass
std::list<uint32> spellIDs;
for (Unit::AuraEffectList::const_iterator auraEffect = auraEffects.begin(); auraEffect != auraEffects.end(); auraEffect++)
for (Unit::AuraEffectList::const_iterator auraEffect = auraEffects.begin(); auraEffect != auraEffects.end(); ++auraEffect)
spellIDs.push_back((*auraEffect)->GetId());
// Remove all auras related to resource tracking (only Herbs and Minerals in 3.3.5a)
for (std::list<uint32>::iterator it = spellIDs.begin(); it != spellIDs.end(); it++)
for (std::list<uint32>::iterator it = spellIDs.begin(); it != spellIDs.end(); ++it)
_player->RemoveOwnedAura(*it, ObjectGuid::Empty, 0, AURA_REMOVE_BY_CANCEL);
}
}