refactor(Core/Misc): abs() to std::abs() (#9789)

This commit is contained in:
Kitzunu
2021-12-31 23:29:39 +01:00
committed by GitHub
parent fe9305c724
commit ac99eb48e1
25 changed files with 60 additions and 60 deletions

View File

@@ -216,10 +216,10 @@ public:
if (ArchavonDeath && EmalonDeath && KoralonDeath)
{
// instance difficulty check is already done in db (achievement_criteria_data)
// int() for Visual Studio, compile errors with abs(time_t)
return (abs(int(ArchavonDeath - EmalonDeath)) < MINUTE && \
abs(int(EmalonDeath - KoralonDeath)) < MINUTE && \
abs(int(KoralonDeath - ArchavonDeath)) < MINUTE);
// int() for Visual Studio, compile errors with std::abs(time_t)
return (std::abs(int(ArchavonDeath - EmalonDeath)) < MINUTE && \
std::abs(int(EmalonDeath - KoralonDeath)) < MINUTE && \
std::abs(int(KoralonDeath - ArchavonDeath)) < MINUTE);
}
break;
default:

View File

@@ -245,7 +245,7 @@ public:
}
else
{
if (me->GetDistance(me->GetHomePosition()) < 40.0f && abs(me->GetPositionZ() - me->GetHomePosition().GetPositionZ()) < 5.0f)
if (me->GetDistance(me->GetHomePosition()) < 40.0f && std::abs(me->GetPositionZ() - me->GetHomePosition().GetPositionZ()) < 5.0f)
{
rage = false;
me->RemoveAurasDueToSpell(SPELL_IOCBOSS_RAGE);