diff options
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp index 221454b99..8b3e0a15c 100644 --- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | #include <memory> | 6 | #include <memory> |
| 7 | #include <ranges> | ||
| 8 | #include <string> | 7 | #include <string> |
| 9 | #include <unordered_map> | 8 | #include <unordered_map> |
| 10 | #include <utility> | 9 | #include <utility> |
| @@ -167,7 +166,7 @@ std::string DumpExpr(const Statement* stmt) { | |||
| 167 | } | 166 | } |
| 168 | } | 167 | } |
| 169 | 168 | ||
| 170 | std::string DumpTree(const Tree& tree, u32 indentation = 0) { | 169 | [[maybe_unused]] std::string DumpTree(const Tree& tree, u32 indentation = 0) { |
| 171 | std::string ret; | 170 | std::string ret; |
| 172 | std::string indent(indentation, ' '); | 171 | std::string indent(indentation, ' '); |
| 173 | for (auto stmt = tree.begin(); stmt != tree.end(); ++stmt) { | 172 | for (auto stmt = tree.begin(); stmt != tree.end(); ++stmt) { |
| @@ -315,8 +314,9 @@ class GotoPass { | |||
| 315 | public: | 314 | public: |
| 316 | explicit GotoPass(Flow::CFG& cfg, ObjectPool<Statement>& stmt_pool) : pool{stmt_pool} { | 315 | explicit GotoPass(Flow::CFG& cfg, ObjectPool<Statement>& stmt_pool) : pool{stmt_pool} { |
| 317 | std::vector gotos{BuildTree(cfg)}; | 316 | std::vector gotos{BuildTree(cfg)}; |
| 318 | for (const Node& goto_stmt : gotos | std::views::reverse) { | 317 | const auto end{gotos.rend()}; |
| 319 | RemoveGoto(goto_stmt); | 318 | for (auto goto_stmt = gotos.rbegin(); goto_stmt != end; ++goto_stmt) { |
| 319 | RemoveGoto(*goto_stmt); | ||
| 320 | } | 320 | } |
| 321 | } | 321 | } |
| 322 | 322 | ||