From a618e5f5b5027d563f6117d018042ddcb8d731c4 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 22 Aug 2021 22:45:50 -0600 Subject: [PATCH] common: assert(0) on Q_assert failure for better debugger experience --- include/common/cmdlib.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/common/cmdlib.hh b/include/common/cmdlib.hh index d5d3124a..690128e9 100644 --- a/include/common/cmdlib.hh +++ b/include/common/cmdlib.hh @@ -20,6 +20,7 @@ #ifndef __COMMON_CMDLIB_H__ #define __COMMON_CMDLIB_H__ +#include #include #include #include @@ -138,6 +139,7 @@ static inline void Q_assert_(bool success, const char *expr, const char *file, i { if (!success) { logprint("%s:%d: Q_assert(%s) failed.\n", file, line, expr); + assert(0); exit(1); } }