#pragma hdrstop
#endif
-#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#if wxUSE_MEMORY_TRACING || wxUSE_DEBUG_CONTEXT
#include "wx/memory.h"
#include <stdarg.h>
#include <string.h>
-#if wxUSE_THREADS && defined(__WXDEBUG__)
+#if wxUSE_THREADS
#define USE_THREADSAFE_MEMORY_ALLOCATION 1
#else
#define USE_THREADSAFE_MEMORY_ALLOCATION 0
*/
bool wxDebugContext::PrintList (void)
{
-#ifdef __WXDEBUG__
TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : NULL));
return true;
-#else
- return false;
-#endif
}
bool wxDebugContext::Dump(void)
{
-#ifdef __WXDEBUG__
{
const wxChar* appName = wxT("application");
wxString appNameStr;
OutputDumpLine(wxEmptyString);
return true;
-#else
- return false;
-#endif
}
-#ifdef __WXDEBUG__
struct wxDebugStatsStruct
{
long instanceCount;
st->next = head;
return st;
}
-#endif
bool wxDebugContext::PrintStatistics(bool detailed)
{
-#ifdef __WXDEBUG__
{
const wxChar* appName = wxT("application");
wxString appNameStr;
OutputDumpLine(wxEmptyString);
return true;
-#else
- (void)detailed;
- return false;
-#endif
}
bool wxDebugContext::PrintClasses(void)
int count;
va_list argptr;
va_start(argptr, szFormat);
- buf[sizeof(buf)/sizeof(wxChar)-1] = _T('\0');
+ buf[WXSIZEOF(buf)-1] = wxT('\0');
// keep 3 bytes for a \r\n\0
- count = wxVsnprintf(buf, sizeof(buf)/sizeof(wxChar)-3, szFormat, argptr);
+ count = wxVsnprintf(buf, WXSIZEOF(buf)-3, szFormat, argptr);
if ( count < 0 )
- count = sizeof(buf)/sizeof(wxChar)-3;
- buf[count]=_T('\r');
- buf[count+1]=_T('\n');
- buf[count+2]=_T('\0');
+ count = WXSIZEOF(buf)-3;
+ buf[count]=wxT('\r');
+ buf[count+1]=wxT('\n');
+ buf[count+2]=wxT('\0');
wxMessageOutputDebug dbgout;
dbgout.Printf(buf);
#endif // USE_THREADSAFE_MEMORY_ALLOCATION
-#ifdef __WXDEBUG__
#if !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)))
#if wxUSE_GLOBAL_MEMORY_OPERATORS
void * operator new (size_t size, wxChar * fileName, int lineNum)
free((char *)st);
}
-#endif // __WXDEBUG__
-
// Trace: send output to the current debugging stream
void wxTrace(const wxChar * ...)
{
// least one cleanup counter object
static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_One;
-#endif // (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#endif // wxUSE_MEMORY_TRACING || wxUSE_DEBUG_CONTEXT