diff options
| author | 2019-10-05 08:37:39 -0400 | |
|---|---|---|
| committer | 2019-10-05 09:14:26 -0400 | |
| commit | 50ad74558566af897db6d7a999101e40ee544108 (patch) | |
| tree | 80b6a06b14ca51550a754ee042a465ac204169d7 /src/video_core/shader/expr.cpp | |
| parent | video_core/{ast, expr}: Use std::move where applicable (diff) | |
| download | yuzu-50ad74558566af897db6d7a999101e40ee544108.tar.gz yuzu-50ad74558566af897db6d7a999101e40ee544108.tar.xz yuzu-50ad74558566af897db6d7a999101e40ee544108.zip | |
video_core/expr: Supply operator!= along with operator==
Provides logical symmetry to the interface.
Diffstat (limited to 'src/video_core/shader/expr.cpp')
| -rw-r--r-- | src/video_core/shader/expr.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
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 { | |||
| 22 | return (*operand1 == *b.operand1) && (*operand2 == *b.operand2); | 22 | return (*operand1 == *b.operand1) && (*operand2 == *b.operand2); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | bool ExprAnd::operator!=(const ExprAnd& b) const { | ||
| 26 | return !operator==(b); | ||
| 27 | } | ||
| 28 | |||
| 25 | bool ExprOr::operator==(const ExprOr& b) const { | 29 | bool ExprOr::operator==(const ExprOr& b) const { |
| 26 | return (*operand1 == *b.operand1) && (*operand2 == *b.operand2); | 30 | return (*operand1 == *b.operand1) && (*operand2 == *b.operand2); |
| 27 | } | 31 | } |
| 28 | 32 | ||
| 33 | bool ExprOr::operator!=(const ExprOr& b) const { | ||
| 34 | return !operator==(b); | ||
| 35 | } | ||
| 36 | |||
| 29 | bool ExprNot::operator==(const ExprNot& b) const { | 37 | bool ExprNot::operator==(const ExprNot& b) const { |
| 30 | return (*operand1 == *b.operand1); | 38 | return *operand1 == *b.operand1; |
| 39 | } | ||
| 40 | |||
| 41 | bool ExprNot::operator!=(const ExprNot& b) const { | ||
| 42 | return !operator==(b); | ||
| 31 | } | 43 | } |
| 32 | 44 | ||
| 33 | Expr MakeExprNot(Expr first) { | 45 | Expr MakeExprNot(Expr first) { |