From 1695624732df39505e695b42ea7097cd0621e807 Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Wed, 12 Jun 2024 19:33:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2release=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E6=97=B6=E7=AC=AC=E4=B8=89=E6=96=B9=E5=BA=93=E6=96=AD=E8=A8=80?= =?UTF-8?q?=E4=B8=8D=E8=A7=A6=E5=8F=91=E5=AF=BC=E8=87=B4=E7=9A=84=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=20(#3617)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdpart/assert.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) 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