aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2019-07-24 13:44:55 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-17 20:33:48 +0100
commit2a63135d3761d5c5c6db3349f05ca65db2255966 (patch)
treebb37690a1a35cce0aeb1e9784438ef46c48ac23b
parentca71fc7b6cc43d4883ad0a2a4c649b36a841b022 (diff)
Core/Misc: Replace some abs() with std::abs()
Always prefer std:: math function compared to C ones, as done in 7fe7f30521503559dc8aee9f3127e11111f8ccc4 (cherry picked from commit e68ebd33395569e9aa006acd04645973d9c96187)
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 4cc5b0575ce..d547b6fd3df 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -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)