From 6adc824d9d15b476320739788564023f995b9da0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 21 Jul 2020 00:29:23 -0400 Subject: video_core: Allow copy elision to take place where applicable Removes const from some variables that are returned from functions, as this allows the move assignment/constructors to execute for them. --- src/video_core/shader/shader_ir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core/shader/shader_ir.cpp') diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index e322c3402..29d794b34 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp @@ -112,9 +112,9 @@ Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buff } Node ShaderIR::GetInternalFlag(InternalFlag flag, bool negated) const { - const Node node = MakeNode(flag); + Node node = MakeNode(flag); if (negated) { - return Operation(OperationCode::LogicalNegate, node); + return Operation(OperationCode::LogicalNegate, std::move(node)); } return node; } -- cgit v1.2.3