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
commitbebbdc20677c900aec5a6fa9481b1861f202ca02 (patch)
treeb11ca2c6d687f276ed53318c0aa7e4ab4080c8a6 /src/video_core/shader/node_helper.cpp
parent60926ac16b1c987f50b965292baa47023f46eb60 (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 6fccbbba3..b3dcd291c 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) {