diff options
author | Lioncash <mathew1800@gmail.com> | 2020-09-23 04:54:32 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-09-23 04:54:36 +0200 |
commit | 0dc6967ff1030e466e8e2da399079a28181c3c09 (patch) | |
tree | d8b6622309e5470b7355be2409348e3ac57924e1 /src/video_core | |
parent | control_flow: Make use of std::move in InsertBranch() (diff) | |
download | yuzu-0dc6967ff1030e466e8e2da399079a28181c3c09.tar yuzu-0dc6967ff1030e466e8e2da399079a28181c3c09.tar.gz yuzu-0dc6967ff1030e466e8e2da399079a28181c3c09.tar.bz2 yuzu-0dc6967ff1030e466e8e2da399079a28181c3c09.tar.lz yuzu-0dc6967ff1030e466e8e2da399079a28181c3c09.tar.xz yuzu-0dc6967ff1030e466e8e2da399079a28181c3c09.tar.zst yuzu-0dc6967ff1030e466e8e2da399079a28181c3c09.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/shader/control_flow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp index 5963cf214..4c8971615 100644 --- a/src/video_core/shader/control_flow.cpp +++ b/src/video_core/shader/control_flow.cpp @@ -547,13 +547,13 @@ bool TryQuery(CFGRebuildState& state) { gather_labels(q2.ssy_stack, state.ssy_labels, block); gather_labels(q2.pbk_stack, state.pbk_labels, block); if (std::holds_alternative<SingleBranch>(*block.branch)) { - const auto branch = std::get_if<SingleBranch>(block.branch.get()); + auto* branch = std::get_if<SingleBranch>(block.branch.get()); if (!branch->condition.IsUnconditional()) { q2.address = block.end + 1; state.queries.push_back(q2); } - Query conditional_query{q2}; + auto& conditional_query = state.queries.emplace_back(q2); if (branch->is_sync) { if (branch->address == unassigned_branch) { branch->address = conditional_query.ssy_stack.top(); @@ -567,15 +567,15 @@ bool TryQuery(CFGRebuildState& state) { conditional_query.pbk_stack.pop(); } conditional_query.address = branch->address; - state.queries.push_back(std::move(conditional_query)); return true; } - const auto multi_branch = std::get_if<MultiBranch>(block.branch.get()); + + const auto* multi_branch = std::get_if<MultiBranch>(block.branch.get()); for (const auto& branch_case : multi_branch->branches) { - Query conditional_query{q2}; + auto& conditional_query = state.queries.emplace_back(q2); conditional_query.address = branch_case.address; - state.queries.push_back(std::move(conditional_query)); } + return true; } |