diff options
| author | 2022-06-12 18:11:02 -0400 | |
|---|---|---|
| committer | 2022-06-13 20:09:32 -0400 | |
| commit | feaf010fa2c2952eaa6659ea2decaaa2493d4bb8 (patch) | |
| tree | 36c28fddb72087b75e06316957275557e166ce71 /src/common/assert.cpp | |
| parent | general: fix compilation on MinGW GCC 12 (diff) | |
| download | yuzu-feaf010fa2c2952eaa6659ea2decaaa2493d4bb8.tar.gz yuzu-feaf010fa2c2952eaa6659ea2decaaa2493d4bb8.tar.xz yuzu-feaf010fa2c2952eaa6659ea2decaaa2493d4bb8.zip | |
common/assert: rework ASSERT handling to avoid std::function usage
Diffstat (limited to 'src/common/assert.cpp')
| -rw-r--r-- | src/common/assert.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/common/assert.cpp b/src/common/assert.cpp index 1a85faccf..6026b7dc2 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp | |||
| @@ -6,13 +6,9 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/settings.h" | 7 | #include "common/settings.h" |
| 8 | 8 | ||
| 9 | void assert_check_condition(bool cond, std::function<void()>&& on_failure) { | 9 | void assert_fail_impl() { |
| 10 | if (!cond) [[unlikely]] { | 10 | if (Settings::values.use_debug_asserts) { |
| 11 | on_failure(); | 11 | Crash(); |
| 12 | |||
| 13 | if (Settings::values.use_debug_asserts) { | ||
| 14 | Crash(); | ||
| 15 | } | ||
| 16 | } | 12 | } |
| 17 | } | 13 | } |
| 18 | 14 | ||