summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/expr.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-10-05 14:17:32 +0200
committerLioncash <mathew1800@gmail.com>2019-10-05 15:14:23 +0200
commit8eb1398f8d90fb2813f438b9fffac716b6ec51d2 (patch)
tree39a270023b64af2dce85e3d4a13484c95243b2b3 /src/video_core/shader/expr.h
parentvideo_core/ast: Supply const accessors for data where applicable (diff)
downloadyuzu-8eb1398f8d90fb2813f438b9fffac716b6ec51d2.tar
yuzu-8eb1398f8d90fb2813f438b9fffac716b6ec51d2.tar.gz
yuzu-8eb1398f8d90fb2813f438b9fffac716b6ec51d2.tar.bz2
yuzu-8eb1398f8d90fb2813f438b9fffac716b6ec51d2.tar.lz
yuzu-8eb1398f8d90fb2813f438b9fffac716b6ec51d2.tar.xz
yuzu-8eb1398f8d90fb2813f438b9fffac716b6ec51d2.tar.zst
yuzu-8eb1398f8d90fb2813f438b9fffac716b6ec51d2.zip
Diffstat (limited to 'src/video_core/shader/expr.h')
-rw-r--r--src/video_core/shader/expr.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/shader/expr.h b/src/video_core/shader/expr.h
index 4c399cef9..1f1638520 100644
--- a/src/video_core/shader/expr.h
+++ b/src/video_core/shader/expr.h
@@ -28,7 +28,7 @@ using Expr = std::shared_ptr<ExprData>;
class ExprAnd final {
public:
- explicit ExprAnd(Expr a, Expr b) : operand1{a}, operand2{b} {}
+ explicit ExprAnd(Expr a, Expr b) : operand1{std::move(a)}, operand2{std::move(b)} {}
bool operator==(const ExprAnd& b) const;
@@ -38,7 +38,7 @@ public:
class ExprOr final {
public:
- explicit ExprOr(Expr a, Expr b) : operand1{a}, operand2{b} {}
+ explicit ExprOr(Expr a, Expr b) : operand1{std::move(a)}, operand2{std::move(b)} {}
bool operator==(const ExprOr& b) const;
@@ -48,7 +48,7 @@ public:
class ExprNot final {
public:
- explicit ExprNot(Expr a) : operand1{a} {}
+ explicit ExprNot(Expr a) : operand1{std::move(a)} {}
bool operator==(const ExprNot& b) const;
@@ -105,9 +105,9 @@ Expr MakeExpr(Args&&... args) {
return std::make_shared<ExprData>(T(std::forward<Args>(args)...));
}
-bool ExprAreEqual(Expr first, Expr second);
+bool ExprAreEqual(const Expr& first, const Expr& second);
-bool ExprAreOpposite(Expr first, Expr second);
+bool ExprAreOpposite(const Expr& first, const Expr& second);
Expr MakeExprNot(Expr first);
@@ -115,6 +115,6 @@ Expr MakeExprAnd(Expr first, Expr second);
Expr MakeExprOr(Expr first, Expr second);
-bool ExprIsTrue(Expr first);
+bool ExprIsTrue(const Expr& first);
} // namespace VideoCommon::Shader