From 50ad74558566af897db6d7a999101e40ee544108 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 5 Oct 2019 08:37:39 -0400 Subject: video_core/expr: Supply operator!= along with operator== Provides logical symmetry to the interface. --- src/video_core/shader/expr.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/video_core/shader/expr.cpp') diff --git a/src/video_core/shader/expr.cpp b/src/video_core/shader/expr.cpp index 39df7a927..2647865d4 100644 --- a/src/video_core/shader/expr.cpp +++ b/src/video_core/shader/expr.cpp @@ -22,12 +22,24 @@ bool ExprAnd::operator==(const ExprAnd& b) const { return (*operand1 == *b.operand1) && (*operand2 == *b.operand2); } +bool ExprAnd::operator!=(const ExprAnd& b) const { + return !operator==(b); +} + bool ExprOr::operator==(const ExprOr& b) const { return (*operand1 == *b.operand1) && (*operand2 == *b.operand2); } +bool ExprOr::operator!=(const ExprOr& b) const { + return !operator==(b); +} + bool ExprNot::operator==(const ExprNot& b) const { - return (*operand1 == *b.operand1); + return *operand1 == *b.operand1; +} + +bool ExprNot::operator!=(const ExprNot& b) const { + return !operator==(b); } Expr MakeExprNot(Expr first) { -- cgit v1.2.3