X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fae803f27be8ae1c4fe8f8775b333cc0fc80bdee..98c4eb39105531b0316a9d8dbf87d7939e4c4270:/include/wx/hashmap.h?ds=sidebyside diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 2b3d1e665f..41aaccb230 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -465,11 +465,19 @@ class WXDLLIMPEXP_BASE wxIntegerHash WX_HASH_MAP_NAMESPACE::hash ushortHash; #if defined wxLongLong_t && !defined wxLongLongIsLong + // hash ought to work but doesn't on some compilers + #if (!defined SIZEOF_LONG_LONG && SIZEOF_LONG == 4) \ + || (defined SIZEOF_LONG_LONG && SIZEOF_LONG_LONG == SIZEOF_LONG * 2) size_t longlongHash( wxLongLong_t x ) const { - return longHash( wx_truncate_cast(wxUint32, x) ) ^ - longHash( wx_truncate_cast(wxUint32, x >> (sizeof(wxUint32) * 8)) ); + return longHash( wx_truncate_cast(long, x) ) ^ + longHash( wx_truncate_cast(long, x >> (sizeof(long) * 8)) ); } + #elif defined SIZEOF_LONG_LONG && SIZEOF_LONG_LONG == SIZEOF_LONG + WX_HASH_MAP_NAMESPACE::hash longlongHash; + #else + WX_HASH_MAP_NAMESPACE::hash longlongHash; + #endif #endif public: