fix(Core/Misc): Change const to be after type name (#10591)

This commit is contained in:
Kitzunu
2022-02-14 20:05:45 +01:00
committed by GitHub
parent 9b83abca39
commit 455899dc75
168 changed files with 438 additions and 438 deletions

View File

@@ -2308,7 +2308,7 @@ void Creature::CallForHelp(float radius, Unit* target /*= nullptr*/)
Cell::VisitGridObjects(this, worker, radius);
}
bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /*= true*/) const
bool Creature::CanAssistTo(Unit const* u, Unit const* enemy, bool checkfaction /*= true*/) const
{
// is it true?
if (!HasReactState(REACT_AGGRESSIVE))
@@ -2368,7 +2368,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
// use this function to avoid having hostile creatures attack
// friendlies and other mobs they shouldn't attack
bool Creature::_IsTargetAcceptable(const Unit* target) const
bool Creature::_IsTargetAcceptable(Unit const* target) const
{
ASSERT(target);
@@ -2385,8 +2385,8 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const
return false;
}
const Unit* myVictim = getAttackerForHelper();
const Unit* targetVictim = target->getAttackerForHelper();
Unit const* myVictim = getAttackerForHelper();
Unit const* targetVictim = target->getAttackerForHelper();
// if I'm already fighting target, or I'm hostile towards the target, the target is acceptable
if (myVictim == target || targetVictim == this || IsHostileTo(target))