diff --git a/3rdpart/assert.h b/3rdpart/assert.h index 0f293fc2..95aa6378 100644 --- a/3rdpart/assert.h +++ b/3rdpart/assert.h @@ -13,22 +13,18 @@ #include -#ifndef NDEBUG - #ifdef assert - #undef assert - #endif//assert +#ifdef assert + #undef assert +#endif//assert - #ifdef __cplusplus - extern "C" { - #endif - extern void Assert_Throw(int failed, const char *exp, const char *func, const char *file, int line, const char *str); - #ifdef __cplusplus - } - #endif +#ifdef __cplusplus +extern "C" { +#endif +extern void Assert_Throw(int failed, const char *exp, const char *func, const char *file, int line, const char *str); +#ifdef __cplusplus +} +#endif - #define assert(exp) Assert_Throw(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__, NULL) -#else - #define assert(e) ((void)0) -#endif//NDEBUG +#define assert(exp) Assert_Throw(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__, NULL) #endif //ZLMEDIAKIT_ASSERT_H