feat: add DEBUG_MODE and ASSETS_PATH macro

This commit is contained in:
2026-04-16 12:55:36 +08:00
parent 60319ebcd8
commit cd107fa35d
5 changed files with 24 additions and 11 deletions

View File

@@ -16,10 +16,7 @@ namespace Assert {
}
}
#ifdef NDEBUG
#define CUBED_ASSERT(cond) ((void)0)
#define CUBED_ASSERT_MSG(cond, message) ((void)0)
#else
#ifdef DEBUG_MODE
#define CUBED_ASSERT(cond) \
do { \
if (!(cond)) { \
@@ -32,4 +29,8 @@ namespace Assert {
::Assert::msg(#cond, __FILE__, __LINE__, __func__, message); \
} \
} while (0)
#else
#define CUBED_ASSERT(cond) ((void)0)
#define CUBED_ASSERT_MSG(cond, message) ((void)0)
#endif