summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-20 15:56:51 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-20 15:59:03 (GMT)
commit56a8e78869325453010fb6c41a5e2b9e6f8f1c95 (patch)
tree86f275570c5590bce611609d2fdba2244a8ddf70 /src/corelib/tools
parent3bcc706cabb61d58d7e6c005f5268747a5e65307 (diff)
downloadQt-56a8e78869325453010fb6c41a5e2b9e6f8f1c95.zip
Qt-56a8e78869325453010fb6c41a5e2b9e6f8f1c95.tar.gz
Qt-56a8e78869325453010fb6c41a5e2b9e6f8f1c95.tar.bz2
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
Diffstat (limited to 'src/corelib/tools')
-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 a18b531..632c422 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 )