debug/assert: add a more descriptive version of WARN_RETURN

This commit is contained in:
Danny Robson 2021-04-12 15:10:25 +10:00
parent fc2d9e77c1
commit 56ba3cb325

View File

@ -108,6 +108,9 @@ constexpr bool debug_enabled = false;
} while (0)
#define WARN_AND_RETURN_IF(COND, VALUE) WARN_RETURN((COND), (VALUE))
#define RETURN_UNLESS(VALUE,CONDITION) do { \
if (const auto &__return_unless = (CONDITION); !__return_unless) { \
if constexpr (debug_enabled) { \