Browse Source
fix patch
Signed-off-by: crueter <crueter@eden-emu.dev>
pull/2755/head
crueter
5 months ago
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
1 changed files with
7 additions and
7 deletions
-
.patch/mcl/0001-assert-macro.patch
|
|
|
@ -3,13 +3,13 @@ index f77dbe7..9ec0b9c 100644 |
|
|
|
--- a/include/mcl/assert.hpp
|
|
|
|
+++ b/include/mcl/assert.hpp
|
|
|
|
@@ -23,8 +23,11 @@ template<typename... Ts>
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace mcl::detail |
|
|
|
|
|
|
|
|
|
|
|
+#ifndef UNREACHABLE
|
|
|
|
#define UNREACHABLE() ASSERT_FALSE("Unreachable code!") |
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
|
|
+#ifndef ASSERT
|
|
|
|
#define ASSERT(expr) \ |
|
|
|
[&] { \ |
|
|
|
@ -19,7 +19,7 @@ index f77dbe7..9ec0b9c 100644 |
|
|
|
} \ |
|
|
|
}() |
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
|
|
+#ifndef ASSERT_MSG
|
|
|
|
#define ASSERT_MSG(expr, ...) \ |
|
|
|
[&] { \ |
|
|
|
@ -29,11 +29,11 @@ index f77dbe7..9ec0b9c 100644 |
|
|
|
} \ |
|
|
|
}() |
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
|
|
+#ifndef ASSERT_FALSE
|
|
|
|
#define ASSERT_FALSE(...) ::mcl::detail::assert_terminate("false", __VA_ARGS__) |
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(NDEBUG) || defined(MCL_IGNORE_ASSERTS) |
|
|
|
-# define DEBUG_ASSERT(expr) ASSUME(expr)
|
|
|
|
-# define DEBUG_ASSERT_MSG(expr, ...) ASSUME(expr)
|
|
|
|
@ -52,4 +52,4 @@ index f77dbe7..9ec0b9c 100644 |
|
|
|
+# ifndef DEBUG_ASSERT_MSG
|
|
|
|
+# define DEBUG_ASSERT_MSG(expr, ...) ASSERT_MSG(expr, __VA_ARGS__)
|
|
|
|
+# endif
|
|
|
|
#endif |
|
|
|
#endif |