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
This commit is contained in:
Mattia Barbon
2003-08-29 20:10:32 +00:00
parent 584e607406
commit d8771ac734
4 changed files with 9 additions and 7 deletions

View File

@@ -525,8 +525,10 @@ CLASSEXP CLASSNAME:public CLASSNAME##_wxImplementation_HashTable \
public: \ public: \
typedef VALUE_T mapped_type; \ typedef VALUE_T mapped_type; \
\ \
CLASSNAME( size_type hint = 100, hasher hf = hasher(), key_equal eq = key_equal() ) \ wxEXPLICIT CLASSNAME( size_type hint = 100, hasher hf = hasher(), \
: CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, CLASSNAME##_wxImplementation_KeyEx() ) {} \ key_equal eq = key_equal() ) \
: CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, \
CLASSNAME##_wxImplementation_KeyEx() ) {} \
\ \
mapped_type& operator[]( const const_key_type& key ) \ mapped_type& operator[]( const const_key_type& key ) \
{ \ { \

View File

@@ -38,7 +38,7 @@ _WX_DECLARE_HASHTABLE( KEY_T, KEY_T, HASH_T, CLASSNAME##_wxImplementation_KeyEx,
CLASSEXP CLASSNAME:public CLASSNAME##_wxImplementation_HashTable \ CLASSEXP CLASSNAME:public CLASSNAME##_wxImplementation_HashTable \
{ \ { \
public: \ public: \
CLASSNAME( size_type hint = 100, hasher hf = hasher(), \ wxEXPLICIT CLASSNAME( size_type hint = 100, hasher hf = hasher(), \
key_equal eq = key_equal() ) \ key_equal eq = key_equal() ) \
: CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, \ : CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, \
CLASSNAME##_wxImplementation_KeyEx() ) {} \ CLASSNAME##_wxImplementation_KeyEx() ) {} \

View File

@@ -208,7 +208,7 @@ wxString wxZipFSHandler::DoFind()
wxLongToLongHashMap::iterator it = m_DirsFound->find(key); wxLongToLongHashMap::iterator it = m_DirsFound->find(key);
if (it == m_DirsFound->end()) if (it == m_DirsFound->end())
{ {
m_DirsFound[key] = 1; (*m_DirsFound)[key] = 1;
filename = dir.AfterLast(wxT('/')); filename = dir.AfterLast(wxT('/'));
dir = dir.BeforeLast(wxT('/')); dir = dir.BeforeLast(wxT('/'));
if (!filename.IsEmpty() && m_BaseDir == dir && if (!filename.IsEmpty() && m_BaseDir == dir &&

View File

@@ -3850,8 +3850,8 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
style | wxWANTS_CHARS , name)) style | wxWANTS_CHARS , name))
return FALSE; return FALSE;
m_colMinWidths =GRID_HASH_SIZE ; m_colMinWidths = wxLongToLongHashMap(GRID_HASH_SIZE) ;
m_rowMinHeights = GRID_HASH_SIZE ; m_rowMinHeights = wxLongToLongHashMap(GRID_HASH_SIZE) ;
Create() ; Create() ;