]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed WX_CLEAR_HASH_SET to compile
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 5 Oct 2007 22:41:54 +0000 (22:41 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 5 Oct 2007 22:41:54 +0000 (22:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/hashset.h

index faabd3a878281da5bbd0dbcb8ad4c49cb3e26b1f..fb423ee11ef1a83f985120e19a2ccb92963ebb56 100644 (file)
@@ -107,6 +107,11 @@ public:                                                                      \
 //     be called (a decent compiler should give a warning about it, but don't
 //     count on it)!
 #define WX_CLEAR_HASH_SET(type, hashset)                                     \
 //     be called (a decent compiler should give a warning about it, but don't
 //     count on it)!
 #define WX_CLEAR_HASH_SET(type, hashset)                                     \
-    WX_CLEAR_HASH_MAP(type, hashset)
+    {                                                                        \
+        type::iterator it, en;                                               \
+        for( it = (hashset).begin(), en = (hashset).end(); it != en; ++it )  \
+            delete *it;                                                      \
+        (hashset).clear();                                                   \
+    }
 
 #endif // _WX_HASHSET_H_
 
 #endif // _WX_HASHSET_H_