X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1688485fd0c206f8e69d464cf84f40bc9ff4a7d..1b941f2d3143c1205fc7c5b01bd254781db728b3:/include/wx/hashmap.h diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 8cc00b57b9..8c234228f2 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -433,8 +433,8 @@ public: \ }; // grow/shrink predicates -inline bool never_grow( size_t, size_t ) { return FALSE; } -inline bool never_shrink( size_t, size_t ) { return FALSE; } +inline bool never_grow( size_t, size_t ) { return false; } +inline bool never_shrink( size_t, size_t ) { return false; } inline bool grow_lf70( size_t buckets, size_t items ) { return float(items)/float(buckets) >= 0.85; @@ -512,12 +512,10 @@ class WXDLLIMPEXP_BASE wxPointerHash public: wxPointerHash() { } - // TODO: this might not work well on architectures with 64 bit pointers but - // 32 bit longs, we should use % ULONG_MAX there #if wxUSE_STL && defined(HAVE_STL_HASH_MAP) size_t operator()( const void* k ) const { return (size_t)k; } #else - unsigned long operator()( const void* k ) const { return (unsigned long)wxPtrToULong(k); } + wxUIntPtr operator()( const void* k ) const { return wxPtrToUInt(k); } #endif wxPointerHash& operator=(const wxPointerHash&) { return *this; }