]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/memory.cpp
added support for drop down toolbar buttons (patch 1713470)
[wxWidgets.git] / src / common / memory.cpp
index 7c062d71a72cf7849712cd4f5f8fe08ff29454a0..9bf20f536b4b61fe20d6b3701950b4b8b83bf495 100644 (file)
 
 #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
 
+#include "wx/memory.h"
+
 #ifndef WX_PRECOMP
+    #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"
 #endif
 
-#include "wx/log.h"
 #include <stdlib.h>
 
 #include "wx/ioswrap.h"
 #include <stdarg.h>
 #include <string.h>
 
-#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
@@ -756,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());
@@ -786,7 +775,6 @@ bool wxDebugContext::PrintClasses(void)
 
         wxLogMessage(msg);
     }
-    node = wxClassInfo::sm_classTable->Next();
     n ++;
   }
   wxLogMessage(wxEmptyString);