From bebbdc20677c900aec5a6fa9481b1861f202ca02 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 16 Jul 2019 10:37:11 -0400 Subject: 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. --- src/video_core/shader/node_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core/shader/node_helper.cpp') 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 code) { - return MakeNode(condition, std::move(code)); + return MakeNode(std::move(condition), std::move(code)); } Node Comment(std::string text) { -- cgit v1.2.3