From b158be6e47d592e88a5025200399b30a5eb5d914 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Fri, 3 Nov 2006 21:32:39 +0000 Subject: [PATCH] Use hash instead of hash when they are the same size since even some 64-bit compilers have a problem with it, it seems. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/hashmap.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 35254a6fb9..41aaccb230 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -465,14 +465,16 @@ class WXDLLIMPEXP_BASE wxIntegerHash WX_HASH_MAP_NAMESPACE::hash ushortHash; #if defined wxLongLong_t && !defined wxLongLongIsLong - // hash 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) + // 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(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 -- 2.45.2