/* 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]; \
+ size_t bucket = m_hasher( key ) % m_tableBuckets; \
+ Node** node = &m_table[bucket]; \
\
while( *node ) \
{ \
/* 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]; \
+ size_t bucket = m_hasher( key ) % m_tableBuckets; \
+ Node* node = m_table[bucket]; \
\
while( node ) \
{ \
WX_HASH_MAP_NAMESPACE::hash<short> shortHash;
WX_HASH_MAP_NAMESPACE::hash<unsigned short> ushortHash;
+#if defined wxLongLong_t && !defined wxLongLongIsLong
size_t longlongHash( wxLongLong_t x ) const
{
return longHash( wx_truncate_cast(long, x) ) ^
longHash( wx_truncate_cast(long, x >> (sizeof(long) * 8)) );
}
+#endif
public:
wxIntegerHash() { }