common/assert: rework ASSERT handling to avoid std::function usage
This commit is contained in:
parent
ebecdd3a74
commit
feaf010fa2
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