From 56ba3cb3259faafe3944b09a1216e4270989ca03 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 12 Apr 2021 15:10:25 +1000 Subject: [PATCH] debug/assert: add a more descriptive version of WARN_RETURN --- debug/assert.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debug/assert.hpp b/debug/assert.hpp index 260cdabb..a9986a57 100644 --- a/debug/assert.hpp +++ b/debug/assert.hpp @@ -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) { \