Redesign SCASSERT to avoid unintended indentation.

This commit is contained in:
Roman Telezhynskyi 2021-09-25 11:41:26 +03:00
parent 803b1cb318
commit d996f7335a

View file

@ -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();