Core/Misc: Fixed deprecation warnings for c++20

This commit is contained in:
Shauren
2023-01-01 00:26:53 +01:00
parent fa361a40c8
commit ba9bbbc9d0
24 changed files with 86 additions and 84 deletions
+3 -3
View File
@@ -319,7 +319,7 @@ void Player::UpdateMaxPower(Powers power)
if (powerIndex == MAX_POWERS || powerIndex >= MAX_POWERS_PER_CLASS)
return;
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + AsUnderlyingType(power));
float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreatePowerValue(power);
value *= GetPctModifierValue(unitMod, BASE_PCT);
@@ -922,7 +922,7 @@ void Creature::UpdateMaxPower(Powers power)
if (GetPowerIndex(power) == MAX_POWERS)
return;
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + AsUnderlyingType(power));
float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreatePowerValue(power);
value *= GetPctModifierValue(unitMod, BASE_PCT);
@@ -1173,7 +1173,7 @@ void Guardian::UpdateMaxPower(Powers power)
if (GetPowerIndex(power) == MAX_POWERS)
return;
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + AsUnderlyingType(power));
float value = GetFlatModifierValue(unitMod, BASE_VALUE) + GetCreatePowerValue(power);
value *= GetPctModifierValue(unitMod, BASE_PCT);