use wxPtrToUInt instead of (lossy) wxPtrToULong

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-10-15 20:35:39 +00:00
parent f2f8a5fce8
commit f12885449a

View File

@@ -512,12 +512,10 @@ class WXDLLIMPEXP_BASE wxPointerHash
public: public:
wxPointerHash() { } 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) #if wxUSE_STL && defined(HAVE_STL_HASH_MAP)
size_t operator()( const void* k ) const { return (size_t)k; } size_t operator()( const void* k ) const { return (size_t)k; }
#else #else
unsigned long operator()( const void* k ) const { return (unsigned long)wxPtrToULong(k); } wxUIntPtr operator()( const void* k ) const { return wxPtrToUInt(k); }
#endif #endif
wxPointerHash& operator=(const wxPointerHash&) { return *this; } wxPointerHash& operator=(const wxPointerHash&) { return *this; }