diff options
| author | Li Jin <dragon-fly@qq.com> | 2022-11-15 17:23:46 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2022-11-15 17:52:09 +0800 |
| commit | 94f8330613877b3582d32bd11abd83a97b4399ad (patch) | |
| tree | 5359de314be1ebde17f8d1e48632a97d18f9e50f /src/3rdParty/efsw/Debug.hpp | |
| parent | 60f8f00a022ac08701792b2897b72d8c99b50f52 (diff) | |
| download | yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.tar.gz yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.tar.bz2 yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.zip | |
adding -w option to Yuescript tool.
Diffstat (limited to 'src/3rdParty/efsw/Debug.hpp')
| -rwxr-xr-x | src/3rdParty/efsw/Debug.hpp | 60 |
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 | |||
| 6 | namespace efsw { | ||
| 7 | |||
| 8 | #ifdef DEBUG | ||
| 9 | |||
| 10 | void 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 | |||
| 21 | void efPRINT( const char* format, ... ); | ||
| 22 | void 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 | ||
