aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/Debug.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdParty/efsw/Debug.hpp')
-rwxr-xr-xsrc/3rdParty/efsw/Debug.hpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/Debug.hpp b/src/3rdParty/efsw/Debug.hpp
new file mode 100755
index 0000000..78d3557
--- /dev/null
+++ b/src/3rdParty/efsw/Debug.hpp
@@ -0,0 +1,60 @@
1#ifndef EFSW_DEBUG_HPP
2#define EFSW_DEBUG_HPP
3
4#include <efsw/base.hpp>
5
6namespace efsw {
7
8#ifdef DEBUG
9
10void efREPORT_ASSERT( const char* File, const int Line, const char* Exp );
11
12#define efASSERT( expr ) \
13 if ( !( expr ) ) { \
14 efREPORT_ASSERT( __FILE__, __LINE__, #expr ); \
15 }
16#define efASSERTM( expr, msg ) \
17 if ( !( expr ) ) { \
18 efREPORT_ASSERT( __FILE__, __LINE__, #msg ); \
19 }
20
21void efPRINT( const char* format, ... );
22void efPRINTC( unsigned int cond, const char* format, ... );
23
24#else
25
26#define efASSERT( expr )
27#define efASSERTM( expr, msg )
28
29#ifndef EFSW_COMPILER_MSVC
30#define efPRINT( format, args... ) \
31 {}
32#define efPRINTC( cond, format, args... ) \
33 {}
34#else
35#define efPRINT
36#define efPRINTC
37#endif
38
39#endif
40
41#ifdef EFSW_VERBOSE
42#define efDEBUG efPRINT
43#define efDEBUGC efPRINTC
44#else
45
46#ifndef EFSW_COMPILER_MSVC
47#define efDEBUG( format, args... ) \
48 {}
49#define efDEBUGC( cond, format, args... ) \
50 {}
51#else
52#define efDEBUG
53#define efDEBUGC
54#endif
55
56#endif
57
58} // namespace efsw
59
60#endif