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/shader_ir.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/shader_ir.cpp')
| -rw-r--r-- | src/video_core/shader/shader_ir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index e322c3402..29d794b34 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp @@ -112,9 +112,9 @@ Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buff } Node ShaderIR::GetInternalFlag(InternalFlag flag, bool negated) const { - const Node node = MakeNode<InternalFlagNode>(flag); + Node node = MakeNode<InternalFlagNode>(flag); if (negated) { - return Operation(OperationCode::LogicalNegate, node); + return Operation(OperationCode::LogicalNegate, std::move(node)); } return node; } |
