common/assert: rework ASSERT handling to avoid std::function usage

This commit is contained in:
Liam 2022-06-12 18:11:02 -04:00
parent ebecdd3a74
commit feaf010fa2
2 changed files with 20 additions and 35 deletions

View file

@ -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();
}
}