Fix ZCG new operation 2 needs parenthesis if precendence is equal

This commit is contained in:
Jan 2021-02-28 17:04:39 +01:00
parent 5b7f33b63d
commit 9578a24c49

View File

@ -36,5 +36,5 @@ bool Operation::Operand1NeedsParenthesis() const
bool Operation::Operand2NeedsParenthesis() const
{
return m_operand2->GetType() == EvaluationType::OPERATION
&& dynamic_cast<Operation*>(m_operand2.get())->m_operation_type->m_precedence > m_operation_type->m_precedence;
&& dynamic_cast<Operation*>(m_operand2.get())->m_operation_type->m_precedence >= m_operation_type->m_precedence;
}