diff options
| author | bunnei <bunneidev@gmail.com> | 2020-04-16 21:12:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-16 21:12:33 -0400 |
| commit | 79c1269f0fd25e8aaf090cd1f4640a52237a3fd3 (patch) | |
| tree | cef3d04b0e14887bbcb6b021d42e2420ae1588a4 /src/video_core/shader/track.cpp | |
| parent | c81f2561111541e1b5b7f18b70ea69f93a33904d (diff) | |
| parent | 1c340c6efad903580904297730d708ce8b947eb6 (diff) | |
Merge pull request #3673 from lioncash/extra
CMakeLists: Specify -Wextra on linux builds
Diffstat (limited to 'src/video_core/shader/track.cpp')
| -rw-r--r-- | src/video_core/shader/track.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp index 10739b37d..224943ad9 100644 --- a/src/video_core/shader/track.cpp +++ b/src/video_core/shader/track.cpp @@ -27,8 +27,9 @@ std::pair<Node, s64> FindOperation(const NodeBlock& code, s64 cursor, if (const auto conditional = std::get_if<ConditionalNode>(&*node)) { const auto& conditional_code = conditional->GetCode(); - auto [found, internal_cursor] = FindOperation( + auto result = FindOperation( conditional_code, static_cast<s64>(conditional_code.size() - 1), operation_code); + auto& found = result.first; if (found) { return {std::move(found), cursor}; } @@ -186,8 +187,8 @@ std::tuple<Node, u32, u32> ShaderIR::TrackCbuf(Node tracked, const NodeBlock& co std::optional<u32> ShaderIR::TrackImmediate(Node tracked, const NodeBlock& code, s64 cursor) const { // Reduce the cursor in one to avoid infinite loops when the instruction sets the same register // that it uses as operand - const auto [found, found_cursor] = - TrackRegister(&std::get<GprNode>(*tracked), code, cursor - 1); + const auto result = TrackRegister(&std::get<GprNode>(*tracked), code, cursor - 1); + const auto& found = result.first; if (!found) { return {}; } |
