diff options
author | Lioncash <mathew1800@gmail.com> | 2019-01-28 07:43:19 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-01-28 07:43:23 -0500 |
commit | 3e1a9a45a6a1686e91768deef5f33afd5e55ed45 (patch) | |
tree | 4dfaba3c8ddab8a675674105f821e5c8577f57dc /src/video_core/shader/decode.cpp | |
parent | a9268286a4f424f365eda720756f48fc90d21989 (diff) |
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.
Diffstat (limited to 'src/video_core/shader/decode.cpp')
-rw-r--r-- | src/video_core/shader/decode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index 6fdcac7848..812983a995 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) { |