IfActions: Tweaks

This commit is contained in:
Brian Ferguson 2013-11-08 08:40:14 -07:00
parent fc96387105
commit cd658fe2b1
2 changed files with 5 additions and 5 deletions

View File

@ -204,20 +204,20 @@ void IfActions::DoIfActions(Measure& measure, double value)
} }
} }
void IfActions::SetState(double value) void IfActions::SetState(double& value)
{ {
// Set IfAction committed state to false if condition is not met with value = 0 // Set IfAction committed state to false if condition is not met with value = 0
if (m_EqualValue != 0) if (m_EqualValue != (int64_t)value)
{ {
m_EqualCommitted = false; m_EqualCommitted = false;
} }
if (m_AboveValue <= 0.0) if (m_AboveValue <= value)
{ {
m_AboveCommitted = false; m_AboveCommitted = false;
} }
if (m_BelowValue >= 0.0) if (m_BelowValue >= value)
{ {
m_BelowCommitted = false; m_BelowCommitted = false;
} }

View File

@ -65,7 +65,7 @@ public:
void ReadOptions(ConfigParser& parser, const WCHAR* section); void ReadOptions(ConfigParser& parser, const WCHAR* section);
void ReadConditionOptions(ConfigParser& parser, const WCHAR* section); void ReadConditionOptions(ConfigParser& parser, const WCHAR* section);
void DoIfActions(Measure& measure, double value); void DoIfActions(Measure& measure, double value);
void SetState(double value = 0.0f); void SetState(double& value);
private: private:
double m_AboveValue; double m_AboveValue;