mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 08:45:45 +00:00
common/assert: rework ASSERT handling to avoid std::function usage
This commit is contained in:
parent
79bf4bc3ff
commit
846f266199
2 changed files with 20 additions and 35 deletions
|
@ -6,13 +6,9 @@
|
|||
|
||||
#include "common/settings.h"
|
||||
|
||||
void assert_check_condition(bool cond, std::function<void()>&& on_failure) {
|
||||
if (!cond) [[unlikely]] {
|
||||
on_failure();
|
||||
|
||||
if (Settings::values.use_debug_asserts) {
|
||||
Crash();
|
||||
}
|
||||
void assert_fail_impl() {
|
||||
if (Settings::values.use_debug_asserts) {
|
||||
Crash();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue