More pretty looking macros.
--HG-- branch : develop
This commit is contained in:
parent
7e2082fc0a
commit
48d4ed5905
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue
Block a user