Core/Misc: Replace some abs() with std::abs()

Always prefer std:: math function compared to C ones, as done in 7fe7f30521

(cherry picked from commit e68ebd3339)
This commit is contained in:
Giacomo Pozzoni
2019-07-24 13:44:55 +02:00
committed by Shauren
parent ca71fc7b6c
commit 2a63135d37

View File

@@ -3359,7 +3359,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bo
Unit* target = aurApp->GetTarget();
int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MOD_STAT, true, GetMiscValue());
if (abs(spellGroupVal) >= abs(GetAmount()))
if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
return;
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
@@ -4049,7 +4049,7 @@ void AuraEffect::HandleModCastingSpeed(AuraApplication const* aurApp, uint8 mode
}
int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, GetAuraType());
if (abs(spellGroupVal) >= abs(GetAmount()))
if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
return;
if (spellGroupVal)
@@ -4078,7 +4078,7 @@ void AuraEffect::HandleModCombatSpeedPct(AuraApplication const* aurApp, uint8 mo
Unit* target = aurApp->GetTarget();
int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MELEE_SLOW);
if (abs(spellGroupVal) >= abs(GetAmount()))
if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
return;
if (spellGroupVal)
@@ -4113,7 +4113,7 @@ void AuraEffect::HandleModMeleeSpeedPct(AuraApplication const* aurApp, uint8 mod
//! ToDo: Haste auras with the same handler _CAN'T_ stack together
Unit* target = aurApp->GetTarget();
int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MOD_MELEE_HASTE);
if (abs(spellGroupVal) >= abs(GetAmount()))
if (std::abs(spellGroupVal) >= std::abs(GetAmount()))
return;
if (spellGroupVal)