summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/assert.hpp16
-rw-r--r--compat/prelude.hpp7
2 files changed, 15 insertions, 8 deletions
diff --git a/compat/assert.hpp b/compat/assert.hpp
index 73e1d376..550933fa 100644
--- a/compat/assert.hpp
+++ b/compat/assert.hpp
@@ -92,14 +92,14 @@
{ \
if (a != b) [[unlikely]] \
{ \
- DBG_nospace << Debug::color(Debug::Color::Magenta) \
- << "fatal:" \
- << Debug::resetColor << " " \
- << "Equality assertion failed at " \
- << __FILE__ << ":" << __LINE__; \
- DBG_nospace << #__VA_ARGS__; \
- DBG_nospace << " expected: " << a; \
- DBG_nospace << " actual: " << b; \
+ FATAL_nospace << Debug::color(Debug::Color::Magenta) \
+ << "fatal:" \
+ << Debug::resetColor << " " \
+ << "Equality assertion failed at " \
+ << __FILE__ << ":" << __LINE__; \
+ FATAL_nospace << #__VA_ARGS__; \
+ FATAL_nospace << " expected: " << a; \
+ FATAL_nospace << " actual: " << b; \
fm_EMIT_ABORT(); \
} \
})(__VA_ARGS__)
diff --git a/compat/prelude.hpp b/compat/prelude.hpp
index 443ab382..973e99d7 100644
--- a/compat/prelude.hpp
+++ b/compat/prelude.hpp
@@ -6,7 +6,14 @@
#include <Magnum/Magnum.h>
#define DBG_nospace (::Corrade::Utility::Debug{::Corrade::Utility::Debug::Flag::NoSpace})
+#define WARNING_nospace (::Corrade::Utility::Warning{::Corrade::Utility::Debug::Flag::NoSpace})
+#define ERROR_nospace (::Corrade::Utility::Error{::Corrade::Utility::Debug::Flag::NoSpace})
+#define FATAL_nospace (::Corrade::Utility::Fatal{::Corrade::Utility::Debug::Flag::NoSpace})
+
#define DBG (::Corrade::Utility::Debug{})
+#define WARNING (::Corrade::Utility::Warning{})
+#define ERROR (::Corrade::Utility::Error{})
+#define FATAL (::Corrade::Utility::Fatal{})
#if !(defined __cpp_size_t_suffix || defined _MSC_VER && _MSVC_LANG < 202004)
#ifdef _MSC_VER