mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-01 04:02:55 +01:00
common: Don't test ASSERT conditions inline
This commit is contained in:
1 parent
c1771c98f3
commit
d2af4f8142
2 files changed
+36
-32
No files matched your search
@@ -6,9 +6,13 @@
|
||||
|
||||
#include "common/settings.h"
|
||||
|
||||
void assert_handle_failure() {
|
||||
if (Settings::values.use_debug_asserts) {
|
||||
Crash();
|
||||
void assert_check_condition(bool cond, std::function<void()>&& on_failure) {
|
||||
if (!cond) {
|
||||
on_failure();
|
||||
|
||||
if (Settings::values.use_debug_asserts) {
|
||||
Crash();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user