28 lines
		
	
	
		
			539 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			539 B
		
	
	
	
		
			C
		
	
	
	
	
	
 | 
						|
#pragma once
 | 
						|
 | 
						|
#if !defined(BAD_APPLE_OS_ASSERT_H_INCLUDED)
 | 
						|
#define BAD_APPLE_OS_ASSERT_H_INCLUDED
 | 
						|
 | 
						|
#include "./detail/common.h"
 | 
						|
 | 
						|
BA_EXTERN_C_BEGIN
 | 
						|
 | 
						|
#if defined(NDEBUG)
 | 
						|
#define assert(condition) ((void) 0)
 | 
						|
#else
 | 
						|
#define assert(condition) \
 | 
						|
if (!(condition)) \
 | 
						|
{ \
 | 
						|
    __ba__assert_fail(__FILE__, __LINE__, #condition); \
 | 
						|
}
 | 
						|
#endif
 | 
						|
 | 
						|
#if !defined(NDEBUG)
 | 
						|
BA_CXX_NORETURN void __ba__assert_fail(const char* filename, int line, const char* condition) BA_CXX_NOEXCEPT;
 | 
						|
#endif
 | 
						|
 | 
						|
BA_EXTERN_C_END
 | 
						|
 | 
						|
#endif // !defined(BAD_APPLE_OS_ASSERT_H_INCLUDED)
 |