debug/assert: add a more descriptive version of WARN_RETURN
This commit is contained in:
parent
fc2d9e77c1
commit
56ba3cb325
@ -108,6 +108,9 @@ constexpr bool debug_enabled = false;
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
#define WARN_AND_RETURN_IF(COND, VALUE) WARN_RETURN((COND), (VALUE))
|
||||||
|
|
||||||
|
|
||||||
#define RETURN_UNLESS(VALUE,CONDITION) do { \
|
#define RETURN_UNLESS(VALUE,CONDITION) do { \
|
||||||
if (const auto &__return_unless = (CONDITION); !__return_unless) { \
|
if (const auto &__return_unless = (CONDITION); !__return_unless) { \
|
||||||
if constexpr (debug_enabled) { \
|
if constexpr (debug_enabled) { \
|
||||||
|
Loading…
Reference in New Issue
Block a user