Use the standard hash<wxLongLong_t> on 64-bit machines.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -465,11 +465,17 @@ class WXDLLIMPEXP_BASE wxIntegerHash
|
|||||||
WX_HASH_MAP_NAMESPACE::hash<unsigned short> ushortHash;
|
WX_HASH_MAP_NAMESPACE::hash<unsigned short> ushortHash;
|
||||||
|
|
||||||
#if defined wxLongLong_t && !defined wxLongLongIsLong
|
#if defined wxLongLong_t && !defined wxLongLongIsLong
|
||||||
|
// hash<wxLongLong_t> ought to work, but some 32-bit compilers have been
|
||||||
|
// found where the hash doesn't work with 64-bit values.
|
||||||
|
#if SIZEOF_LONG == 4 && (!defined SIZEOF_LONG_LONG || SIZEOF_LONG_LONG == 8)
|
||||||
size_t longlongHash( wxLongLong_t x ) const
|
size_t longlongHash( wxLongLong_t x ) const
|
||||||
{
|
{
|
||||||
return longHash( wx_truncate_cast(wxUint32, x) ) ^
|
return longHash( wx_truncate_cast(long, x) ) ^
|
||||||
longHash( wx_truncate_cast(wxUint32, x >> (sizeof(wxUint32) * 8)) );
|
longHash( wx_truncate_cast(long, x >> (sizeof(long) * 8)) );
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
WX_HASH_MAP_NAMESPACE::hash<wxLongLong_t> longlongHash;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user