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

This commit is contained in:
Liam committed 2022-06-13 20:09:32 -04:00
1 parent ebecdd3a74
commit feaf010fa2
2 files changed
+20 -35

No files matched your search

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