From d8771ac73408ebe31dadc8bdfcb718dcdbd94ca4 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Fri, 29 Aug 2003 20:10:32 +0000 Subject: [PATCH] Fixed bug introduced in fs_zip.cpp when replacing wxHashTableLong with wxHashMap. Made wxHashMap constructor explicit to prevent similar errors. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/hashmap.h | 6 ++++-- include/wx/hashset.h | 4 ++-- src/common/fs_zip.cpp | 2 +- src/generic/grid.cpp | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 0502f6a27a..3f2e008976 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -525,8 +525,10 @@ CLASSEXP CLASSNAME:public CLASSNAME##_wxImplementation_HashTable \ public: \ typedef VALUE_T mapped_type; \ \ - CLASSNAME( size_type hint = 100, hasher hf = hasher(), key_equal eq = key_equal() ) \ - : CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, CLASSNAME##_wxImplementation_KeyEx() ) {} \ + wxEXPLICIT CLASSNAME( size_type hint = 100, hasher hf = hasher(), \ + key_equal eq = key_equal() ) \ + : CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, \ + CLASSNAME##_wxImplementation_KeyEx() ) {} \ \ mapped_type& operator[]( const const_key_type& key ) \ { \ diff --git a/include/wx/hashset.h b/include/wx/hashset.h index 4e40bb7698..83cd9861e1 100644 --- a/include/wx/hashset.h +++ b/include/wx/hashset.h @@ -38,8 +38,8 @@ _WX_DECLARE_HASHTABLE( KEY_T, KEY_T, HASH_T, CLASSNAME##_wxImplementation_KeyEx, CLASSEXP CLASSNAME:public CLASSNAME##_wxImplementation_HashTable \ { \ public: \ - CLASSNAME( size_type hint = 100, hasher hf = hasher(), \ - key_equal eq = key_equal() ) \ + wxEXPLICIT CLASSNAME( size_type hint = 100, hasher hf = hasher(), \ + key_equal eq = key_equal() ) \ : CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, \ CLASSNAME##_wxImplementation_KeyEx() ) {} \ \ diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index f3e807d87c..bb449aab85 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -208,7 +208,7 @@ wxString wxZipFSHandler::DoFind() wxLongToLongHashMap::iterator it = m_DirsFound->find(key); if (it == m_DirsFound->end()) { - m_DirsFound[key] = 1; + (*m_DirsFound)[key] = 1; filename = dir.AfterLast(wxT('/')); dir = dir.BeforeLast(wxT('/')); if (!filename.IsEmpty() && m_BaseDir == dir && diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 9f7a7a496b..1b90d1ad26 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3850,8 +3850,8 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id, style | wxWANTS_CHARS , name)) return FALSE; - m_colMinWidths =GRID_HASH_SIZE ; - m_rowMinHeights = GRID_HASH_SIZE ; + m_colMinWidths = wxLongToLongHashMap(GRID_HASH_SIZE) ; + m_rowMinHeights = wxLongToLongHashMap(GRID_HASH_SIZE) ; Create() ; -- 2.45.2