diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 2d4b4b016..d2b0cf9cd 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -162,31 +162,23 @@ enum class GSizes : unsigned char { ALL, * https://stackoverflow.com/questions/1721543/continue-to-debug-after-failed-assertion-on-linux-c-c */ #ifndef V_NO_ASSERT + #ifdef Q_CC_MSVC -#define SCASSERT(cond) \ -{ \ - if (!(cond)) \ - { \ - qDebug("ASSERT: %s in %s (%s:%u)", \ - #cond, __FUNCSIG__, __FILE__, __LINE__); \ - debug_break(); \ - } \ -} \ - +#define V_PRETTY_FUNCTION __FUNCSIG__ #else // GCC/Clang +#define V_PRETTY_FUNCTION __PRETTY_FUNCTION__ +#endif /*Q_CC_MSVC*/ #define SCASSERT(cond) \ { \ if (!(cond)) \ { \ qDebug("ASSERT: %s in %s (%s:%u)", \ - #cond, __PRETTY_FUNCTION__, __FILE__, __LINE__);\ + #cond, V_PRETTY_FUNCTION, __FILE__, __LINE__); \ debug_break(); \ } \ } \ -#endif /*Q_CC_MSVC*/ - #else // define but disable this function if debugging is not set #define SCASSERT(cond) qt_noop(); #endif /* V_NO_ASSERT */