From 3e1a9a45a6a1686e91768deef5f33afd5e55ed45 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 28 Jan 2019 07:43:19 -0500 Subject: shader/decode: Avoid a pessimizing std::move within DecodeRange() std::moveing a local variable in a return statement has the potential to prevent copy elision from occurring, so this can just be converted into a regular return. --- src/video_core/shader/decode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index 6fdcac784..812983a99 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp @@ -126,7 +126,7 @@ BasicBlock ShaderIR::DecodeRange(u32 begin, u32 end) { for (u32 pc = begin; pc < (begin > end ? MAX_PROGRAM_LENGTH : end);) { pc = DecodeInstr(basic_block, pc); } - return std::move(basic_block); + return basic_block; } u32 ShaderIR::DecodeInstr(BasicBlock& bb, u32 pc) { -- cgit v1.2.3