]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/hashmap.h
use wxIsSameDouble() and wxIsNullDouble() for warning-less double comparison of doubles
[wxWidgets.git] / include / wx / hashmap.h
index 7e20a9abc2c1cb9da66df23dd20e8f9964d61485..b08eedcf3031981acf8b19446e70cf18f83fa91c 100644 (file)
 #ifndef _WX_HASHMAP_H_
 #define _WX_HASHMAP_H_
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "hashmap.h"
-#endif
-
 #include "wx/string.h"
 
 #if (defined(HAVE_EXT_HASH_MAP) || defined(HAVE_HASH_MAP)) \
@@ -101,10 +97,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 +337,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 +354,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 ) \