fixed wxCHECK in release build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -112,8 +112,11 @@
|
|||||||
#define wxFAIL wxFAIL_MSG(NULL)
|
#define wxFAIL wxFAIL_MSG(NULL)
|
||||||
|
|
||||||
/* FAIL with some message */
|
/* FAIL with some message */
|
||||||
#define wxFAIL_MSG(msg) \
|
#define wxFAIL_MSG(msg) wxFAIL_COND_MSG("wxAssertFailure", msg)
|
||||||
wxOnAssert(__TFILE__, __LINE__, __FUNCTION__, _T("wxAssertFailure"), msg)
|
|
||||||
|
/* FAIL with some message and a condition */
|
||||||
|
#define wxFAIL_COND_MSG(cond, msg) \
|
||||||
|
wxOnAssert(__TFILE__, __LINE__, __FUNCTION__, _T(cond), msg)
|
||||||
|
|
||||||
/* an assert helper used to avoid warning when testing constant expressions, */
|
/* an assert helper used to avoid warning when testing constant expressions, */
|
||||||
/* i.e. wxASSERT( sizeof(int) == 4 ) can generate a compiler warning about */
|
/* i.e. wxASSERT( sizeof(int) == 4 ) can generate a compiler warning about */
|
||||||
@@ -132,6 +135,7 @@
|
|||||||
#define wxASSERT_MSG(cond, msg)
|
#define wxASSERT_MSG(cond, msg)
|
||||||
#define wxFAIL
|
#define wxFAIL
|
||||||
#define wxFAIL_MSG(msg)
|
#define wxFAIL_MSG(msg)
|
||||||
|
#define wxFAIL_COND_MSG(cond, msg)
|
||||||
#endif /* __WXDEBUG__ */
|
#endif /* __WXDEBUG__ */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -167,7 +171,7 @@
|
|||||||
else \
|
else \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
wxOnAssert(__TFILE__, __LINE__, __FUNCTION__, _T(#cond), msg); \
|
wxFAIL_COND_MSG(#cond, msg); \
|
||||||
op; \
|
op; \
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user