From 6c4d1888eb2003b0186ca7a5b3484ff054cf03cd 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: Thu, 23 Nov 2023 09:42:13 -0800 Subject: [PATCH] Cleanup. --- src/bimg_p.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bimg_p.h b/src/bimg_p.h index 5b9a42a..ff968d8 100644 --- a/src/bimg_p.h +++ b/src/bimg_p.h @@ -31,13 +31,13 @@ } \ BX_MACRO_BLOCK_END -#define _BIMG_ASSERT(_condition, _format, ...) \ - BX_MACRO_BLOCK_BEGIN \ - if (!BX_IGNORE_C4127(_condition) ) \ - { \ - BX_TRACE("ASSERT " _format, ##__VA_ARGS__); \ - bx::debugBreak(); \ - } \ +#define _BIMG_ASSERT(_condition, _format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + if (!BX_IGNORE_C4127(_condition) \ + && bx::assertFunction(bx::Location::current(), "ASSERT " #_condition " -> " _format, ##__VA_ARGS__) ) \ + { \ + bx::debugBreak(); \ + } \ BX_MACRO_BLOCK_END #include @@ -85,7 +85,7 @@ namespace bimg if (_hasMips) { const uint32_t max = bx::max(_width, _height, _depth); - const uint32_t num = 1 + uint32_t(bx::log2((int32_t)max) ); + const uint32_t num = 1 + bx::ceilLog2(max); return uint8_t(num); }