]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/hash.h
Compilation fix for old GCC versions.
[wxWidgets.git] / include / wx / hash.h
index cefc7996bd6defa472c703577d0598152bdf1374..a85d83c83b388e4947595c483b81e93af9d8090c 100644 (file)
 #ifndef _WX_HASH_H__
 #define _WX_HASH_H__
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "hash.h"
-#endif
-
 #include "wx/defs.h"
 
 #if !wxUSE_STL && WXWIN_COMPATIBILITY_2_4
@@ -397,8 +393,6 @@ public:
 
     size_t GetCount() const { return wxHashTableBase::GetCount(); }
 protected:
-    virtual void DoDeleteContents( wxHashTableBase_Node* node );
-
     // copy helper
     void DoCopy( const wxHashTable& copy );
 
@@ -406,6 +400,8 @@ protected:
     // m_curr to it and m_currBucket to its bucket
     void GetNextNode( size_t bucketStart );
 private:
+    virtual void DoDeleteContents( wxHashTableBase_Node* node );
+
     // current node
     Node* m_curr;
 
@@ -430,7 +426,7 @@ public:
 
     wxHashTable(int the_key_type = wxKEY_INTEGER,
                 int size = wxHASH_SIZE_DEFAULT);
-    ~wxHashTable();
+    virtual ~wxHashTable();
 
     // copy ctor and assignment operator
     wxHashTable(const wxHashTable& table) : wxObject()
@@ -529,7 +525,7 @@ private:
         eltype *Delete(long key) { return (eltype*)DoDelete(key, key); }      \
         eltype *Delete(long lhash, long key)                                  \
             { return (eltype*)DoDelete(key, lhash); }                         \
-    protected:                                                                \
+    private:                                                                  \
         virtual void DoDeleteContents( wxHashTableBase_Node* node )           \
             { delete (eltype*)node->GetData(); }                              \
                                                                               \
@@ -546,7 +542,7 @@ private:
                   size_t size = wxHASH_SIZE_DEFAULT)                           \
             { Create(keyType, size); }                                         \
                                                                                \
-        ~hashclass() { Destroy(); }                                            \
+        virtual ~hashclass() { Destroy(); }                                            \
                                                                                \
         void Put(long key, long val, eltype *data) { DoPut(key, val, data); }  \
         void Put(long key, eltype *data) { DoPut(key, key, data); }            \