parent
c52908c9a9
commit
781673be80
34 changed files with 705 additions and 152 deletions
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Reference in a new issue