"Merge Tagged PR 1340"
This commit is contained in:
1 parent
96d0602682
commit
6d5436df9c
1 file changed
+9
-12
+9
-12
@@ -29,22 +29,19 @@ assert_noinline_call(const Fn& fn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define ASSERT(_a_) \
|
#define ASSERT(_a_) \
|
||||||
do \
|
if (!(_a_)) { \
|
||||||
if (!(_a_)) { \
|
LOG_CRITICAL(Debug, "Assertion Failed!"); \
|
||||||
assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \
|
}
|
||||||
} \
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
#define ASSERT_MSG(_a_, ...) \
|
#define ASSERT_MSG(_a_, ...) \
|
||||||
do \
|
if (!(_a_)) { \
|
||||||
if (!(_a_)) { \
|
LOG_CRITICAL(Debug, "Assertion Failed! " __VA_ARGS__); \
|
||||||
assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
|
}
|
||||||
} \
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
#define UNREACHABLE() assert_noinline_call([] { LOG_CRITICAL(Debug, "Unreachable code!"); })
|
#define UNREACHABLE() \
|
||||||
|
{ LOG_CRITICAL(Debug, "Unreachable code!"); }
|
||||||
#define UNREACHABLE_MSG(...) \
|
#define UNREACHABLE_MSG(...) \
|
||||||
assert_noinline_call([&] { LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); })
|
{ LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); }
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define DEBUG_ASSERT(_a_) ASSERT(_a_)
|
#define DEBUG_ASSERT(_a_) ASSERT(_a_)
|
||||||
|
|||||||
Reference in new issue
Block a user