- #86
- #88 
- #87 
- #89
This commit is contained in:
Erin Catto 2026-07-24 21:48:23 -07:00 • committed by GitHub
commit 781673be80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 705 additions and 152 deletions

View file

@ -68,6 +68,13 @@
#endif
// clang-format on
// This is used to validate arguments for functions similar to printf.
#if defined( __GNUC__ ) || defined( __clang__ )
#define B3_PRINTF_FORMAT( INDEX1, INDEX2 ) __attribute__( ( format( printf, INDEX1, INDEX2 ) ) )
#else
#define B3_PRINTF_FORMAT( INDEX1, INDEX2 )
#endif
#if defined( BOX3D_VALIDATE ) && !defined( NDEBUG )
#define B3_ENABLE_VALIDATION 1
#else
@ -125,7 +132,7 @@ B3_API void b3SetAssertFcn( b3AssertFcn* assertFcn );
/// Internal assertion handler. Allows for host intervention.
B3_API int b3InternalAssert( const char* condition, const char* fileName, int lineNumber );
/// Assert that a condition is true.
#define B3_ASSERT( condition ) \
#define B3_ASSERT( condition ) \
( (void)( ( !!( condition ) ) || ( b3InternalAssert( #condition, __FILE__, (int)( __LINE__ ) ), 0 ) ) )
#else
#define B3_ASSERT( ... ) ( (void)0 )