From af959f53f9c1908fc7f54d6545c02ae5da5de697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 21 Oct 2025 18:03:23 -0700 Subject: [PATCH] Cleanup. --- include/bx/macros.h | 4 ++-- src/bx.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/bx/macros.h b/include/bx/macros.h index f2124be..d6fb1cf 100644 --- a/include/bx/macros.h +++ b/include/bx/macros.h @@ -100,8 +100,8 @@ extern "C" void* __cdecl _alloca(size_t _size); #define BX_ALIGN_DECL_CACHE_LINE(_decl) BX_ALIGN_DECL(BX_CACHE_LINE_SIZE, _decl) /// -#define BX_MACRO_BLOCK_BEGIN for(;;) { -#define BX_MACRO_BLOCK_END break; } +#define BX_MACRO_BLOCK_BEGIN do { +#define BX_MACRO_BLOCK_END } while (false) #define BX_NOOP(...) BX_MACRO_BLOCK_BEGIN BX_MACRO_BLOCK_END /// diff --git a/src/bx.cpp b/src/bx.cpp index 80c613d..a89f214 100644 --- a/src/bx.cpp +++ b/src/bx.cpp @@ -85,7 +85,7 @@ namespace bx { va_list argList; va_start(argList, _format); - const bool result = s_assertHandler(_location, _skip, _format, argList); + const bool result = s_assertHandler(_location, _skip + 1 /* skip self */, _format, argList); va_end(argList); return result;