From 89ba00e6cd5601093592c8b4c0a2e078cb2d188d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Mon, 4 Dec 2023 21:49:39 -0800 Subject: [PATCH] Cleanup. --- include/bx/macros.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/bx/macros.h b/include/bx/macros.h index 7d86465..e4cd5a4 100644 --- a/include/bx/macros.h +++ b/include/bx/macros.h @@ -236,7 +236,7 @@ # if BX_CONFIG_DEBUG # define BX_ASSERT_LOC _BX_ASSERT_LOC # else -# define BX_ASSERT_LOC(...) BX_NOOP() +# define BX_ASSERT_LOC(_location, ...) BX_MACRO_BLOCK_BEGIN BX_UNUSED(_location) BX_MACRO_BLOCK_END # endif // BX_CONFIG_DEBUG #endif // BX_ASSERT_LOC @@ -252,7 +252,7 @@ # if BX_CONFIG_DEBUG # define BX_TRACE_LOC _BX_TRACE_LOC # else -# define BX_TRACE_LOC(...) BX_NOOP() +# define BX_TRACE_LOC(_location, ...) BX_MACRO_BLOCK_BEGIN BX_UNUSED(_location) BX_MACRO_BLOCK_END # endif // BX_CONFIG_DEBUG #endif // BX_TRACE_LOC @@ -268,7 +268,7 @@ # if BX_CONFIG_DEBUG # define BX_WARN_LOC _BX_WARN_LOC # else -# define BX_WARN_LOC(...) BX_NOOP() +# define BX_WARN_LOC(_location, ...) BX_MACRO_BLOCK_BEGIN BX_UNUSED(_location) BX_MACRO_BLOCK_END # endif // BX_CONFIG_DEBUG #endif // BX_WARN_LOC @@ -282,14 +282,6 @@ bx::debugPrintf("%s(%d): BX " _format "\n", _location.filePath, _location.line, ##__VA_ARGS__); \ BX_MACRO_BLOCK_END -#define _BX_WARN(_condition, _format, ...) \ - BX_MACRO_BLOCK_BEGIN \ - if (!BX_IGNORE_C4127(_condition) ) \ - { \ - BX_TRACE("WARN " _format, ##__VA_ARGS__); \ - } \ - BX_MACRO_BLOCK_END - #define _BX_ASSERT(_condition, _format, ...) \ BX_MACRO_BLOCK_BEGIN \ if (!BX_IGNORE_C4127(_condition) \ @@ -308,6 +300,14 @@ } \ BX_MACRO_BLOCK_END +#define _BX_WARN(_condition, _format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + if (!BX_IGNORE_C4127(_condition) ) \ + { \ + BX_TRACE("WARN " _format, ##__VA_ARGS__); \ + } \ + BX_MACRO_BLOCK_END + #define _BX_WARN_LOC(_location, _condition, _format, ...) \ BX_MACRO_BLOCK_BEGIN \ if (!BX_IGNORE_C4127(_condition) ) \