]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for pure virtual method call caused by wxHashTable not
authorMattia Barbon <mbarbon@cpan.org>
Sat, 8 May 2004 09:33:29 +0000 (09:33 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sat, 8 May 2004 09:33:29 +0000 (09:33 +0000)
overriding virtual destructor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/hash.h
src/common/hash.cpp

index 851ce62231b77d1c6234da2046c2715725b3a79b..194302ae7a58c851c783e674098b8d2eb756533d 100644 (file)
@@ -159,7 +159,7 @@ public:
     typedef wxHashTableBase_Node Node;
 
     wxHashTableBase();
-    virtual ~wxHashTableBase();
+    virtual ~wxHashTableBase() { };
 
     void Create( wxKeyType keyType = wxKEY_INTEGER,
                  size_t size = wxHASH_SIZE_DEFAULT );
@@ -344,6 +344,8 @@ public:
         : wxHashTableBase() { Create( keyType, size ); BeginFind(); }
     wxHashTable( const wxHashTable& table );
 
+    virtual ~wxHashTable() { Destroy(); }
+
     const wxHashTable& operator=( const wxHashTable& );
 
     void Destroy() { Clear(); }
@@ -514,7 +516,7 @@ private:
                   size_t size = wxHASH_SIZE_DEFAULT)                          \
             : wxHashTableBase() { Create(keyType, size); }                    \
                                                                               \
-        ~hashclass() { Destroy(); }                                           \
+        virtual ~hashclass() { Destroy(); }                                   \
                                                                               \
         void Destroy() { Clear(); }                                           \
         void Put(long key, eltype *data) { DoPut(key, key, (void*)data); }    \
index abcc84f7c8cdfd2e06251467c6745bc274caec7e..28ba8276dad35db2462f34f4bc87dbb7d7b0c608 100644 (file)
@@ -753,11 +753,6 @@ wxHashTableBase::wxHashTableBase()
 {
 }
 
-wxHashTableBase::~wxHashTableBase()
-{
-    Destroy();
-}
-
 void wxHashTableBase::Create( wxKeyType keyType, size_t size )
 {
     m_keyType = keyType;
@@ -1038,7 +1033,7 @@ const wxHashTable& wxHashTable::operator=( const wxHashTable& table )
     return *this;
 }
 
-void wxHashTable::DoCopy( const wxHashTable& table )
+void wxHashTable::DoCopy( const wxHashTable& WXUNUSED(table) )
 {
     Create( m_keyType, m_size );