summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-20 17:56:51 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-20 17:59:03 +0200
commit56a8e78869325453010fb6c41a5e2b9e6f8f1c95 (patch)
tree86f275570c5590bce611609d2fdba2244a8ddf70
parent3bcc706cabb61d58d7e6c005f5268747a5e65307 (diff)
Fix a compile error on MSVC 64bits due to qhash casting a pointer.
I tested it with 32 bits compilation and there is no warning any more. Task-number: 247325 Reviewed-by: ogoffart
-rw-r--r--src/corelib/tools/qhash.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index a18b531dd9..632c422ddd 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -97,10 +97,7 @@ Q_CORE_EXPORT uint qHash(const QBitArray &key);
#endif
template <class T> inline uint qHash(const T *key)
{
- if (sizeof(const T *) > sizeof(uint))
- return qHash(reinterpret_cast<quint64>(key));
- else
- return uint(reinterpret_cast<ulong>(key));
+ return qHash(reinterpret_cast<quintptr>(key));
}
#if defined(Q_CC_MSVC)
#pragma warning( pop )