Core/Unit: fix warning reported by VS2015
C4146: unary minus operator applied to unsigned type, result still unsigned
This commit is contained in:
1 parent
6e191748ab
commit
7a0647ec46
1 file changed
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user