mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 03:42:34 +01:00
- disable some debug prints on non-debug versions
This commit is contained in:
parent
e57fa7de29
commit
c0cc23416c
@ -189,8 +189,8 @@ const int TAIL_GETTINGFAR = 12900;
|
||||
const int TAIL_TOOCLOSE = 4000;
|
||||
const int TAIL_TOOFAR = 15900;
|
||||
|
||||
#ifdef DEBUG_OPTIONS
|
||||
#define MR_DebugPrint //printInfo
|
||||
#ifdef _DEBUG
|
||||
#define MR_DebugPrint // printInfo
|
||||
#define MR_DebugWarn printWarning
|
||||
#else
|
||||
#define MR_DebugPrint
|
||||
|
@ -45,6 +45,12 @@ extern void sys_freeall();
|
||||
#define D_TEMPFREE()
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define DMalloc_DebugPrint printWarning
|
||||
#else
|
||||
#define DMalloc_DebugPrint (void)
|
||||
#endif
|
||||
|
||||
#define D_MALLOC_BEGIN() \
|
||||
{ \
|
||||
volatile const char* _oldmalloc = mallocptr;
|
||||
@ -53,13 +59,13 @@ extern void sys_freeall();
|
||||
#define D_MALLOC_END() \
|
||||
D_TEMPFREE();\
|
||||
if(mallocptr > _oldmalloc)\
|
||||
printWarning("malloc(%d) in %s, line %d. Malloc usage: %d\n", mallocptr-_oldmalloc, __FUNCTION__, __LINE__, (mallocptr-malloctab));\
|
||||
DMalloc_DebugPrint("malloc(%d) in %s, line %d. Malloc usage: %d\n", mallocptr-_oldmalloc, __FUNCTION__, __LINE__, (mallocptr-malloctab));\
|
||||
} // D_MALLOC_BEGIN block
|
||||
#else
|
||||
#define D_MALLOC_END() \
|
||||
D_TEMPFREE();\
|
||||
if(mallocptr > _oldmalloc)\
|
||||
printWarning("malloc(%d) in " __FUNCTION__ ", line %d. Malloc usage: %d\n", mallocptr-_oldmalloc, __LINE__, (mallocptr-malloctab));\
|
||||
DMalloc_DebugPrint("malloc(%d) in " __FUNCTION__ ", line %d. Malloc usage: %d\n", mallocptr-_oldmalloc, __LINE__, (mallocptr-malloctab));\
|
||||
} // D_MALLOC_BEGIN block
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user