diff options
| author | 2019-01-28 07:43:19 -0500 | |
|---|---|---|
| committer | 2019-01-28 07:43:23 -0500 | |
| commit | 3e1a9a45a6a1686e91768deef5f33afd5e55ed45 (patch) | |
| tree | 4dfaba3c8ddab8a675674105f821e5c8577f57dc /src/video_core/shader/decode.cpp | |
| parent | Merge pull request #2060 from lioncash/exception (diff) | |
| download | yuzu-3e1a9a45a6a1686e91768deef5f33afd5e55ed45.tar.gz yuzu-3e1a9a45a6a1686e91768deef5f33afd5e55ed45.tar.xz yuzu-3e1a9a45a6a1686e91768deef5f33afd5e55ed45.zip | |
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 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) { | |||
| 126 | for (u32 pc = begin; pc < (begin > end ? MAX_PROGRAM_LENGTH : end);) { | 126 | for (u32 pc = begin; pc < (begin > end ? MAX_PROGRAM_LENGTH : end);) { |
| 127 | pc = DecodeInstr(basic_block, pc); | 127 | pc = DecodeInstr(basic_block, pc); |
| 128 | } | 128 | } |
| 129 | return std::move(basic_block); | 129 | return basic_block; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | u32 ShaderIR::DecodeInstr(BasicBlock& bb, u32 pc) { | 132 | u32 ShaderIR::DecodeInstr(BasicBlock& bb, u32 pc) { |