Core/Unit: fix warning reported by VS2015

C4146: unary minus operator applied to unsigned type, result still unsigned
This commit is contained in:
ariel- authored and Aokromes committed 2016-11-02 03:01:30 +01:00
1 parent 6e191748ab
commit 7a0647ec46
1 file changed
+1 -2
+1 -2
View File
@@ -122,8 +122,7 @@ m_damageType(DIRECT_DAMAGE), m_attackType(dmgInfo.attackType)
void DamageInfo::ModifyDamage(int32 amount)
{
if (amount < 0)
amount = std::max(amount, static_cast<int32>(-GetDamage()));
amount = std::max(amount, -static_cast<int32>(m_damage));
m_damage += amount;
}