Selaa lähdekoodia

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.
Lioncash 7 vuotta sitten
vanhempi
commit
3e1a9a45a6
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/video_core/shader/decode.cpp

+ 1 - 1
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);) {
     for (u32 pc = begin; pc < (begin > end ? MAX_PROGRAM_LENGTH : end);) {
         pc = DecodeInstr(basic_block, pc);
         pc = DecodeInstr(basic_block, pc);
     }
     }
-    return std::move(basic_block);
+    return basic_block;
 }
 }
 
 
 u32 ShaderIR::DecodeInstr(BasicBlock& bb, u32 pc) {
 u32 ShaderIR::DecodeInstr(BasicBlock& bb, u32 pc) {