add trailing \
This commit is contained in:
parent
6bcdeb7cb9
commit
b326532099
|
@ -10,16 +10,16 @@
|
||||||
#define raise_debug_assert(SizeT, msg, param1, param2, param3) \
|
#define raise_debug_assert(SizeT, msg, param1, param2, param3) \
|
||||||
raise_exception(SizeT, EXN_ASSERTION_ERROR, "IRRT debug assert failed: " msg, param1, param2, param3)
|
raise_exception(SizeT, EXN_ASSERTION_ERROR, "IRRT debug assert failed: " msg, param1, param2, param3)
|
||||||
|
|
||||||
#define debug_assert_eq(SizeT, lhs, rhs) if constexpr (IRRT_DEBUG_ASSERT_BOOL)
|
#define debug_assert_eq(SizeT, lhs, rhs) \
|
||||||
{
|
if constexpr (IRRT_DEBUG_ASSERT_BOOL) { \
|
||||||
if ((lhs) != (rhs)) {
|
if ((lhs) != (rhs)) { \
|
||||||
raise_debug_assert(SizeT, "LHS = {0}. RHS = {1}", lhs, rhs, NO_PARAM);
|
raise_debug_assert(SizeT, "LHS = {0}. RHS = {1}", lhs, rhs, NO_PARAM); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#define debug_assert(SizeT, expr) if constexpr (IRRT_DEBUG_ASSERT_BOOL)
|
#define debug_assert(SizeT, expr) \
|
||||||
{
|
if constexpr (IRRT_DEBUG_ASSERT_BOOL) { \
|
||||||
if (!(expr)) {
|
if (!(expr)) { \
|
||||||
raise_debug_assert(SizeT, "Got false.", NO_PARAM, NO_PARAM, NO_PARAM);
|
raise_debug_assert(SizeT, "Got false.", NO_PARAM, NO_PARAM, NO_PARAM); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
}
|
|
Loading…
Reference in New Issue