Remove cast of hash value to unsigned long, hash value can be bigger
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -337,8 +337,7 @@ protected: \
|
|||||||
/* returns NULL if not found */ \
|
/* returns NULL if not found */ \
|
||||||
Node** GetNodePtr( const const_key_type& key ) const \
|
Node** GetNodePtr( const const_key_type& key ) const \
|
||||||
{ \
|
{ \
|
||||||
unsigned long hash = wx_static_cast(unsigned long, m_hasher( key )); \
|
Node** node = &m_table[m_hasher( key ) % m_tableBuckets]; \
|
||||||
Node** node = &m_table[hash % m_tableBuckets]; \
|
|
||||||
\
|
\
|
||||||
while( *node ) \
|
while( *node ) \
|
||||||
{ \
|
{ \
|
||||||
@@ -354,8 +353,7 @@ protected: \
|
|||||||
/* expressing it in terms of GetNodePtr is 5-8% slower :-( */ \
|
/* expressing it in terms of GetNodePtr is 5-8% slower :-( */ \
|
||||||
Node* GetNode( const const_key_type& key ) const \
|
Node* GetNode( const const_key_type& key ) const \
|
||||||
{ \
|
{ \
|
||||||
unsigned long hash = wx_static_cast(unsigned long, m_hasher( key )); \
|
Node* node = m_table[m_hasher( key ) % m_tableBuckets]; \
|
||||||
Node* node = m_table[hash % m_tableBuckets]; \
|
|
||||||
\
|
\
|
||||||
while( node ) \
|
while( node ) \
|
||||||
{ \
|
{ \
|
||||||
|
Reference in New Issue
Block a user