X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e786a78b1c826c54a8d7a233cfab7195dcd7e279..5851053a968330aea0a4bd6918b330eb0bfa0007:/include/wx/hashmap.h diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 8e8cffcc56..14e5619e6a 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -344,10 +344,11 @@ protected: \ { \ if( m_equals( m_getKey( (*node)->m_value ), key ) ) \ return node; \ + /* 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 0; \ + return NULL; \ } \ \ /* returns NULL if not found */ \ @@ -639,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)