From 51b30d5943a769acebe19b03a6f8705740c98037 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Mon, 7 Oct 2002 20:37:21 +0000 Subject: [PATCH] Fix wxHashMap::clear git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/hashmap.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 9b635e8a07..ff830ae039 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -218,7 +218,12 @@ public: \ \ /* removes all elements from the hash table, but does not */ \ /* shrink it ( perhaps it should ) */ \ - void clear() { DeleteNodes( m_tableBuckets, (_wxHashTable_NodeBase**)m_table, DeleteNode ); } \ + void clear() \ + { \ + DeleteNodes( m_tableBuckets, (_wxHashTable_NodeBase**)m_table, \ + DeleteNode ); \ + m_items = 0; \ + } \ \ size_type size() const { return m_items; } \ size_type max_size() const { return size_type(-1); } \