diff options
| author | 2024-02-19 16:00:46 +0100 | |
|---|---|---|
| committer | 2024-02-19 16:00:46 +0100 | |
| commit | 310c1f50beb77fc5c6f9075029973161d4e51a4a (patch) | |
| tree | 43a5699123e4930560fc5016faac7efb15b63f4e /src/video_core/macro | |
| parent | core/CMakeLists: Sort alphabetically (diff) | |
| download | yuzu-310c1f50beb77fc5c6f9075029973161d4e51a4a.tar.gz yuzu-310c1f50beb77fc5c6f9075029973161d4e51a4a.tar.xz yuzu-310c1f50beb77fc5c6f9075029973161d4e51a4a.zip | |
scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
Diffstat (limited to 'src/video_core/macro')
| -rw-r--r-- | src/video_core/macro/macro_hle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp index 46e853e04..fb529f88b 100644 --- a/src/video_core/macro/macro_hle.cpp +++ b/src/video_core/macro/macro_hle.cpp | |||
| @@ -92,12 +92,12 @@ public: | |||
| 92 | 92 | ||
| 93 | private: | 93 | private: |
| 94 | void Fallback(const std::vector<u32>& parameters) { | 94 | void Fallback(const std::vector<u32>& parameters) { |
| 95 | SCOPE_EXIT({ | 95 | SCOPE_EXIT { |
| 96 | if (extended) { | 96 | if (extended) { |
| 97 | maxwell3d.engine_state = Maxwell3D::EngineHint::None; | 97 | maxwell3d.engine_state = Maxwell3D::EngineHint::None; |
| 98 | maxwell3d.replace_table.clear(); | 98 | maxwell3d.replace_table.clear(); |
| 99 | } | 99 | } |
| 100 | }); | 100 | }; |
| 101 | maxwell3d.RefreshParameters(); | 101 | maxwell3d.RefreshParameters(); |
| 102 | const u32 instance_count = (maxwell3d.GetRegisterValue(0xD1B) & parameters[2]); | 102 | const u32 instance_count = (maxwell3d.GetRegisterValue(0xD1B) & parameters[2]); |
| 103 | 103 | ||
| @@ -281,12 +281,12 @@ public: | |||
| 281 | 281 | ||
| 282 | private: | 282 | private: |
| 283 | void Fallback(const std::vector<u32>& parameters) { | 283 | void Fallback(const std::vector<u32>& parameters) { |
| 284 | SCOPE_EXIT({ | 284 | SCOPE_EXIT { |
| 285 | // Clean everything. | 285 | // Clean everything. |
| 286 | maxwell3d.regs.vertex_id_base = 0x0; | 286 | maxwell3d.regs.vertex_id_base = 0x0; |
| 287 | maxwell3d.engine_state = Maxwell3D::EngineHint::None; | 287 | maxwell3d.engine_state = Maxwell3D::EngineHint::None; |
| 288 | maxwell3d.replace_table.clear(); | 288 | maxwell3d.replace_table.clear(); |
| 289 | }); | 289 | }; |
| 290 | maxwell3d.RefreshParameters(); | 290 | maxwell3d.RefreshParameters(); |
| 291 | const u32 start_indirect = parameters[0]; | 291 | const u32 start_indirect = parameters[0]; |
| 292 | const u32 end_indirect = parameters[1]; | 292 | const u32 end_indirect = parameters[1]; |