From: Mattia Barbon Date: Fri, 29 Aug 2003 20:10:32 +0000 (+0000) Subject: Fixed bug introduced in fs_zip.cpp when replacing wxHashTableLong X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d8771ac73408ebe31dadc8bdfcb718dcdbd94ca4 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 --- 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() ;