]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove cast of hash value to unsigned long, hash value can be bigger
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Tue, 27 Sep 2005 19:24:47 +0000 (19:24 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Tue, 27 Sep 2005 19:24:47 +0000 (19:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/hashmap.h

index ad8005c31c9824a19fa0ce84eb4ae27d38734e38..ae3667ce41a5f84777cee6397b9ceefbb41681c4 100644 (file)
@@ -337,8 +337,7 @@ protected: \
     /* returns NULL if not found */ \
     Node** GetNodePtr( const const_key_type& key ) const \
     { \
-        unsigned long hash = wx_static_cast(unsigned long, m_hasher( key )); \
-        Node** node = &m_table[hash % m_tableBuckets]; \
+        Node** node = &m_table[m_hasher( key ) % m_tableBuckets]; \
  \
         while( *node ) \
         { \
@@ -354,8 +353,7 @@ protected: \
     /* expressing it in terms of GetNodePtr is 5-8% slower :-( */ \
     Node* GetNode( const const_key_type& key ) const \
     { \
-        unsigned long hash = wx_static_cast(unsigned long, m_hasher( key )); \
-        Node* node = m_table[hash % m_tableBuckets]; \
+        Node* node = m_table[m_hasher( key ) % m_tableBuckets]; \
  \
         while( node ) \
         { \