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.
This commit is contained in:
Lioncash 2019-07-16 10:37:11 -04:00
parent 4d02d971de
commit 41e2ad0f26
4 changed files with 67 additions and 60 deletions

View file

@ -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) {