diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-07-21 00:29:23 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-07-21 00:36:13 -0400 |
| commit | 6adc824d9d15b476320739788564023f995b9da0 (patch) | |
| tree | bb5f4932c851a88e5a9e05ddceb4ebb26c11403b /src/video_core/shader/decode/arithmetic_integer.cpp | |
| parent | ad0b2951250979549082fdef3ba4fd93a720b5df (diff) | |
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.
Diffstat (limited to 'src/video_core/shader/decode/arithmetic_integer.cpp')
| -rw-r--r-- | src/video_core/shader/decode/arithmetic_integer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp index a041519b7..73155966f 100644 --- a/src/video_core/shader/decode/arithmetic_integer.cpp +++ b/src/video_core/shader/decode/arithmetic_integer.cpp @@ -98,12 +98,12 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) { op_b = GetOperandAbsNegInteger(op_b, false, instr.iadd3.neg_b, true); op_c = GetOperandAbsNegInteger(op_c, false, instr.iadd3.neg_c, true); - const Node value = [&]() { - const Node add_ab = Operation(OperationCode::IAdd, NO_PRECISE, op_a, op_b); + const Node value = [&] { + Node add_ab = Operation(OperationCode::IAdd, NO_PRECISE, op_a, op_b); if (opcode->get().GetId() != OpCode::Id::IADD3_R) { return Operation(OperationCode::IAdd, NO_PRECISE, add_ab, op_c); } - const Node shifted = [&]() { + const Node shifted = [&] { switch (instr.iadd3.mode) { case Tegra::Shader::IAdd3Mode::RightShift: // TODO(tech4me): According to |
