Skip to content

Commit

Permalink
Use bx::assertFunction in BGFX_ASSERT.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Nov 14, 2023
1 parent e60dab3 commit cf440e2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/bgfx_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ namespace bgfx
} \
BX_MACRO_BLOCK_END

#define _BGFX_ASSERT(_condition, _format, ...) \
BX_MACRO_BLOCK_BEGIN \
if (!BX_IGNORE_C4127(_condition) ) \
{ \
BX_TRACE("ASSERT " _format, ##__VA_ARGS__); \
bgfx::fatal(__FILE__, uint16_t(__LINE__), bgfx::Fatal::DebugCheck, _format, ##__VA_ARGS__); \
} \
#define _BGFX_ASSERT(_condition, _format, ...) \
BX_MACRO_BLOCK_BEGIN \
if (!BX_IGNORE_C4127(_condition) \
&& bx::assertFunction(bx::Location::current(), "ASSERT " #_condition " -> " _format, ##__VA_ARGS__) ) \
{ \
bgfx::fatal(__FILE__, uint16_t(__LINE__), bgfx::Fatal::DebugCheck, _format, ##__VA_ARGS__); \
} \
BX_MACRO_BLOCK_END

#define BGFX_FATAL(_condition, _err, _format, ...) \
Expand Down

0 comments on commit cf440e2

Please sign in to comment.