Develop: 修改check在发布时不生效
This commit is contained in:
parent
2ce8d722b2
commit
4399f15874
@ -3,6 +3,7 @@
|
||||
#include <cassert>
|
||||
|
||||
// 定义 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user