Core/Condition: Fix issue reported by static analysis

Coverity defect ID: 1339314

(cherry picked from commit d1889602166b03a9c4dc07b6523410714ef3d1f6)
This commit is contained in:
Vincent-Michael
2015-11-14 04:24:51 +01:00
committed by Carbenium
parent 230e820898
commit 700508e484
+1 -1
View File
@@ -326,7 +326,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
Unit* unit = object->ToUnit();
if (toUnit && unit)
{
switch (ConditionValue2)
switch (static_cast<RelationType>(ConditionValue2))
{
case RELATION_SELF:
condMeets = unit == toUnit;