aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/node_helper.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-07-16 10:37:11 -0400
committerLioncash <mathew1800@gmail.com>2019-07-16 19:49:23 -0400
commit41e2ad0f260e20cf9b6ab503a5e408949544cd26 (patch)
treeb11ca2c6d687f276ed53318c0aa7e4ab4080c8a6 /src/video_core/shader/node_helper.cpp
parent4d02d971de17a31f31b8a44c0d0c33d45ce5eff4 (diff)
shader_ir: std::move Node instance where applicable
These are std::shared_ptr instances underneath the hood, which means copying them isn't as cheap as a regular pointer. Particularly so on weakly-ordered systems. This avoids atomic reference count increments and decrements where they aren't necessary for the core set of operations.
Diffstat (limited to 'src/video_core/shader/node_helper.cpp')
-rw-r--r--src/video_core/shader/node_helper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/shader/node_helper.cpp b/src/video_core/shader/node_helper.cpp
index 6fccbbba3a..b3dcd291c1 100644
--- a/src/video_core/shader/node_helper.cpp
+++ b/src/video_core/shader/node_helper.cpp
@@ -12,7 +12,7 @@
namespace VideoCommon::Shader {
Node Conditional(Node condition, std::vector<Node> code) {
- return MakeNode<ConditionalNode>(condition, std::move(code));
+ return MakeNode<ConditionalNode>(std::move(condition), std::move(code));
}
Node Comment(std::string text) {