Core/Misc: Define some methods const

This commit is contained in:
Spp
2012-11-20 09:29:52 +01:00
parent ced723a53a
commit 81606e5d1e
127 changed files with 273 additions and 269 deletions

View File

@@ -77,17 +77,13 @@ void SummonList::RemoveNotExisting()
}
}
bool SummonList::HasEntry(uint32 entry)
bool SummonList::HasEntry(uint32 entry) const
{
for (iterator i = begin(); i != end();)
for (const_iterator i = begin(); i != end(); ++i)
{
Creature* summon = Unit::GetCreature(*me, *i);
if (!summon)
erase(i++);
else if (summon->GetEntry() == entry)
if (summon && summon->GetEntry() == entry)
return true;
else
++i;
}
return false;