X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/766a1d00c31a074bf92c60ac85765590d36d889f..4f696af8d6901707449302763ab06dc970a15a78:/src/common/memory.cpp diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 1a6fae329d..9bf20f536b 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: memory.cpp +// Name: src/common/memory.cpp // Purpose: Memory checking implementation // Author: Arthur Seaton, Julian Smart // Modified by: @@ -13,26 +13,27 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/defs.h" + #pragma hdrstop #endif #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT +#include "wx/memory.h" + #ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/hash.h" + #ifdef __WXMSW__ + #include "wx/msw/wrapwin.h" + #endif + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/hash.h" + #include "wx/log.h" #endif #if wxUSE_THREADS -#include "wx/thread.h" + #include "wx/thread.h" #endif -#include "wx/log.h" #include #include "wx/ioswrap.h" @@ -45,21 +46,6 @@ #include #include -#ifdef __WXMSW__ -#include "wx/msw/wrapwin.h" - -#ifdef GetClassInfo -#undef GetClassInfo -#endif - -#ifdef GetClassName -#undef GetClassName -#endif - -#endif - -#include "wx/memory.h" - #if wxUSE_THREADS && defined(__WXDEBUG__) #define USE_THREADSAFE_MEMORY_ALLOCATION 1 #else @@ -760,14 +746,13 @@ bool wxDebugContext::PrintClasses(void) } int n = 0; - wxHashTable::compatibility_iterator node; - wxClassInfo *info; + const wxClassInfo *info; - wxClassInfo::sm_classTable->BeginFind(); - node = wxClassInfo::sm_classTable->Next(); - while (node) + for (wxClassInfo::const_iterator node = wxClassInfo::begin_classinfo(), + end = wxClassInfo::end_classinfo(); + node != end; ++node) { - info = (wxClassInfo *)node->GetData(); + info = *node; if (info->GetClassName()) { wxString msg(info->GetClassName()); @@ -790,7 +775,6 @@ bool wxDebugContext::PrintClasses(void) wxLogMessage(msg); } - node = wxClassInfo::sm_classTable->Next(); n ++; } wxLogMessage(wxEmptyString); @@ -1160,4 +1144,3 @@ void wxDebugContextDumpDelayCounter::DoDump() static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_One; #endif // (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT -