[11368] small code refactoring: use container typedefs instead of direct container declarations to simplify code.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2011-04-16 13:42:28 +03:00
parent 4b7dffcc09
commit 5a22b8c6dd
5 changed files with 26 additions and 24 deletions

View file

@ -572,7 +572,7 @@ void AreaAura::Update(uint32 diff)
Unit* owner = caster->GetCharmerOrOwner();
if (!owner)
owner = caster;
std::list<Unit *> targets;
Spell::UnitList targets;
switch(m_areaAuraType)
{
@ -668,7 +668,7 @@ void AreaAura::Update(uint32 diff)
}
}
for(std::list<Unit *>::iterator tIter = targets.begin(); tIter != targets.end(); tIter++)
for(Spell::UnitList::iterator tIter = targets.begin(); tIter != targets.end(); tIter++)
{
// flag for seelction is need apply aura to current iteration target
bool apply = true;
@ -7730,7 +7730,7 @@ void Aura::PeriodicDummyTick()
if (target->hasUnitState(UNIT_STAT_STUNNED) || target->isFeared())
return;
std::list<Unit*> targets;
Spell::UnitList targets;
{
// eff_radius ==0
float radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(spell->rangeIndex));
@ -7743,7 +7743,7 @@ void Aura::PeriodicDummyTick()
if(targets.empty())
return;
std::list<Unit*>::const_iterator itr = targets.begin();
Spell::UnitList::const_iterator itr = targets.begin();
std::advance(itr, rand()%targets.size());
Unit* victim = *itr;