From d996f7335aa59916cb0c485a93a83e3c0ca339a5 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 25 Sep 2021 11:41:26 +0300 Subject: [PATCH] Redesign SCASSERT to avoid unintended indentation. --- src/libs/vmisc/def.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 8e7bf8cf4..f4be0b8b5 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -309,16 +309,14 @@ enum class IMD: qint8 // Individual measurement dimension */ #ifndef V_NO_ASSERT -#define SCASSERT(cond) \ -{ \ - if (!(cond)) \ - { \ - qCritical("ASSERT: %s in %s (%s:%u)", \ - #cond, Q_FUNC_INFO , __FILE__, __LINE__); \ - debug_break(); \ - abort(); \ - } \ -} \ +#define SCASSERT(cond) \ +if (!(cond)) \ +{ \ + qCritical("ASSERT: %s in %s (%s:%u)", \ + #cond, Q_FUNC_INFO , __FILE__, __LINE__); \ + debug_break(); \ + abort(); \ +} #else // define but disable this function if debugging is not set #define SCASSERT(cond) qt_noop();