From: Vadim Zeitlin Date: Fri, 15 Oct 2004 20:35:39 +0000 (+0000) Subject: use wxPtrToUInt instead of (lossy) wxPtrToULong X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f12885449a3c112354428207f4663ca9f3d74dc8 use wxPtrToUInt instead of (lossy) wxPtrToULong git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 89601b6ec3..8c234228f2 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -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; }