X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7ab66a1cb2dcaef9558c5a1e12c11583f38ae3b..bf83191aadc77ef37b03fba4e3caf0e1bdbebba4:/include/wx/hashset.h diff --git a/include/wx/hashset.h b/include/wx/hashset.h index 599690d402..fb423ee11e 100644 --- a/include/wx/hashset.h +++ b/include/wx/hashset.h @@ -23,7 +23,7 @@ #endif #define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP )\ - typedef WX_HASH_MAP_NAMESPACE::hash_set< KEY_T, HASH_T, KEY_EQ_T > CLASSNAME; + typedef WX_HASH_MAP_NAMESPACE::hash_set< KEY_T, HASH_T, KEY_EQ_T > CLASSNAME #else // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP) @@ -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) \ - 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_