diff --git a/core/misc/core_assert.h b/core/misc/core_assert.h index 51966f8..c177ebc 100644 --- a/core/misc/core_assert.h +++ b/core/misc/core_assert.h @@ -3,6 +3,7 @@ #include // 定义 check 宏 +#if BUILD_DEBUG #define check(expr) \ do { \ if (!(expr)) { \ @@ -19,6 +20,10 @@ do { \ assert(expr); \ } \ } while (0) +#else +#define check(expr) +#define checkf(expr, msg, ...) +#endif // 定义 ensure 宏 #if BUILD_DEBUG