X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f5c62f982ff185daf8bed1f87ef7214fbb6d8cc..239eaa415414c5d978072af89772b12e74309e1d:/include/wx/hashmap.h?ds=sidebyside diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 31280b1f5b..97e0456013 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -34,7 +34,7 @@ #endif #define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \ - typedef WX_HASH_MAP_NAMESPACE::hash_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME; + typedef WX_HASH_MAP_NAMESPACE::hash_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME #else // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP) @@ -344,10 +344,11 @@ protected: \ { \ if( m_equals( m_getKey( (*node)->m_value ), key ) ) \ return node; \ - node = (Node**)&(*node)->m_nxt; \ + /* Tell the compiler to not do any strict-aliasing assumptions with the void cast */ \ + node = (Node**)(void*)&(*node)->m_nxt; \ } \ \ - return 0; \ + return NULL; \ } \ \ /* returns NULL if not found */ \