mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-29 17:46:29 +03:00
38 lines
751 B
C++
38 lines
751 B
C++
#ifndef EE_DEBUG_HPP
|
|
#define EE_DEBUG_HPP
|
|
|
|
#include <eepp/declares.hpp>
|
|
|
|
namespace EE {
|
|
|
|
extern bool PrintDebugInLog;
|
|
|
|
#ifdef EE_DEBUG
|
|
|
|
void EE_API eeREPORT_ASSERT( const char * File, const int Line, const char * Exp );
|
|
|
|
#define eeASSERT( expr ) if ( !(expr) ) { eeREPORT_ASSERT( __FILE__, __LINE__, #expr ); }
|
|
#define eeASSERTM( expr, msg ) if ( !(expr) ) { eeREPORT_ASSERT( __FILE__, __LINE__, #msg ); }
|
|
|
|
void eePRINT ( const char * format, ... );
|
|
void eePRINTC ( unsigned int cond, const char * format, ... );
|
|
|
|
#else
|
|
|
|
#define eeASSERT( expr )
|
|
#define eeASSERTM( expr, msg )
|
|
|
|
#ifdef EE_COMPILER_GCC
|
|
#define eePRINT( format, args... ) {}
|
|
#define eePRINTC( cond, format, args... ) {}
|
|
#else
|
|
#define eePRINT
|
|
#define eePRINTC
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
#endif
|