diff --git a/Library/IfActions.cpp b/Library/IfActions.cpp index 70b2bd94..6de6d324 100644 --- a/Library/IfActions.cpp +++ b/Library/IfActions.cpp @@ -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 - if (m_EqualValue != 0) + if (m_EqualValue != (int64_t)value) { m_EqualCommitted = false; } - if (m_AboveValue <= 0.0) + if (m_AboveValue <= value) { m_AboveCommitted = false; } - if (m_BelowValue >= 0.0) + if (m_BelowValue >= value) { m_BelowCommitted = false; } diff --git a/Library/IfActions.h b/Library/IfActions.h index 214b3ac3..f9a3ec93 100644 --- a/Library/IfActions.h +++ b/Library/IfActions.h @@ -65,7 +65,7 @@ public: void ReadOptions(ConfigParser& parser, const WCHAR* section); void ReadConditionOptions(ConfigParser& parser, const WCHAR* section); void DoIfActions(Measure& measure, double value); - void SetState(double value = 0.0f); + void SetState(double& value); private: double m_AboveValue;