X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a71e770e1dd7049e762d95e3b4c8876d1258a0c..3786c8b587f82e406ba9656847b5bff4ed9209c2:/include/wx/hashmap.h diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 97e0456013..14e5619e6a 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -344,8 +344,8 @@ protected: \ { \ if( m_equals( m_getKey( (*node)->m_value ), key ) ) \ return node; \ - /* Tell the compiler to not do any strict-aliasing assumptions with the void cast */ \ - node = (Node**)(void*)&(*node)->m_nxt; \ + /* Tell the compiler to not do any strict-aliasing assumptions with a void cast? Can we make such a runtime guarantee? */ \ + node = (Node**)&(*node)->m_nxt; \ } \ \ return NULL; \ @@ -640,7 +640,10 @@ public: \ \ /* count() == 0 | 1 */ \ size_type count( const const_key_type& key ) \ - { return GetNode( key ) ? 1 : 0; } \ + { \ + /* explicit cast needed to suppress CodeWarrior warnings */ \ + return (size_type)(GetNode( key ) ? 1 : 0); \ + } \ } #endif // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)