]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/hashset.h
make wxMouseState accessors const; document this class
[wxWidgets.git] / include / wx / hashset.h
index 9c96e5e9e20768d67f174912b0378ffcd2c4227e..1be24e907b4f80c571029599cf1615c92e3a5284 100644 (file)
@@ -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)
 
@@ -83,7 +83,7 @@ public:                                                                      \
     /* count() == 0 | 1 */                                                   \
     size_type count( const const_key_type& key )                             \
         { return GetNode( key ) ? 1 : 0; }                                   \
-};
+}
 
 #endif // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)
 
@@ -98,7 +98,7 @@ public:                                                                      \
 
 #define WX_DECLARE_EXPORTED_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME) \
     WX_DECLARE_HASH_SET_WITH_DECL( KEY_T, HASH_T, KEY_EQ_T, \
-                                   CLASSNAME, class WXDLLEXPORT )
+                                   CLASSNAME, class WXDLLIMPEXP_CORE )
 
 // delete all hash elements
 //
@@ -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_