mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-01-12 03:31:49 +00:00
Add equals operation to simpleexpressionvalue to check if an expression is the same as another one
This commit is contained in:
@@ -11,6 +11,16 @@ SimpleExpressionConditionalOperator::SimpleExpressionConditionalOperator(std::un
|
||||
{
|
||||
}
|
||||
|
||||
bool SimpleExpressionConditionalOperator::Equals(const ISimpleExpression* other) const
|
||||
{
|
||||
const auto* otherConditionalOperator = dynamic_cast<const SimpleExpressionConditionalOperator*>(other);
|
||||
|
||||
return otherConditionalOperator
|
||||
&& m_condition->Equals(otherConditionalOperator->m_condition.get())
|
||||
&& m_true_value->Equals(otherConditionalOperator->m_true_value.get())
|
||||
&& m_false_value->Equals(otherConditionalOperator->m_false_value.get());
|
||||
}
|
||||
|
||||
bool SimpleExpressionConditionalOperator::IsStatic() const
|
||||
{
|
||||
return m_condition->IsStatic() && m_true_value->IsStatic() && m_false_value->IsStatic();
|
||||
|
||||
Reference in New Issue
Block a user