X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86baa52d2235d6add6e68ae38755ebd9435483bd..187202106f074d2a43bd9036a8b99a9b09316cb0:/include/wx/hashmap.h diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 7e20a9abc2..b1d2f06314 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -101,10 +101,10 @@ protected: { return (void **)calloc(sz, sizeof(void*)); } - static void FreeTable(void *table) - { - free(table); - } + static void FreeTable(void *table) + { + free(table); + } }; #define _WX_DECLARE_HASHTABLE( VALUE_T, KEY_T, HASH_T, KEY_EX_T, KEY_EQ_T, CLASSNAME, CLASSEXP, SHOULD_GROW, SHOULD_SHRINK ) \ @@ -341,7 +341,7 @@ protected: \ /* returns NULL if not found */ \ Node** GetNodePtr( const const_key_type& key ) const \ { \ - unsigned long hash = m_hasher( key ); \ + unsigned long hash = wx_static_cast(unsigned long, m_hasher( key )); \ Node** node = &m_table[hash % m_tableBuckets]; \ \ while( *node ) \ @@ -358,7 +358,7 @@ protected: \ /* expressing it in terms of GetNodePtr is 5-8% slower :-( */ \ Node* GetNode( const const_key_type& key ) const \ { \ - unsigned long hash = m_hasher( key ); \ + unsigned long hash = wx_static_cast(unsigned long, m_hasher( key )); \ Node* node = m_table[hash % m_tableBuckets]; \ \ while( node ) \