VERY experimental Nintendo Switch 2 emulator
C++
video_core/expr: Supply operator!= along with operator==
Lioncash844d714085a9
diff --git a/src/video_core/shader/expr.cpp b/src/video_core/shader/expr.cppindex 39df7a9274..2647865d4c 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) {diff --git a/src/video_core/shader/expr.h b/src/video_core/shader/expr.hindex 1f1638520a..45695c0edc 100644--- a/src/video_core/shader/expr.h+++ b/src/video_core/shader/expr.h@@ -31,6 +31,7 @@ public:explicit ExprAnd(Expr a, Expr b) : operand1{std::move(a)}, operand2{std::move(b)} {}bool operator==(const ExprAnd& b) const;+ bool operator!=(const ExprAnd& b) const;Expr operand1;Expr operand2;@@ -41,6 +42,7 @@ public:explicit ExprOr(Expr a, Expr b) : operand1{std::move(a)}, operand2{std::move(b)} {}bool operator==(const ExprOr& b) const;+ bool operator!=(const ExprOr& b) const;Expr operand1;Expr operand2;@@ -51,6 +53,7 @@ public:explicit ExprNot(Expr a) : operand1{std::move(a)} {}bool operator==(const ExprNot& b) const;+ bool operator!=(const ExprNot& b) const;Expr operand1;};@@ -63,6 +66,10 @@ public:return var_index == b.var_index;}+ bool operator!=(const ExprVar& b) const {+ return !operator==(b);+ }+u32 var_index;};@@ -74,6 +81,10 @@ public:return predicate == b.predicate;}+ bool operator!=(const ExprPredicate& b) const {+ return !operator==(b);+ }+u32 predicate;};@@ -85,6 +96,10 @@ public:return cc == b.cc;}+ bool operator!=(const ExprCondCode& b) const {+ return !operator==(b);+ }+ConditionCode cc;};@@ -96,6 +111,10 @@ public:return value == b.value;}+ bool operator!=(const ExprBoolean& b) const {+ return !operator==(b);+ }+bool value;};