From a8ceb73b93cdfdf7f0d07819c11d09f24deb6b4f Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 10 Apr 2012 21:28:10 +0100 Subject: [PATCH] qHash: qHash(T*) two arguments support Change-Id: I1b78914fe9c6ee9251d68af1f2e95f1e3e0f1db5 Reviewed-by: Thiago Macieira --- src/corelib/tools/qhash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 2bc6cc4e81..1aa4fa7adc 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -95,9 +95,9 @@ Q_CORE_EXPORT uint qt_hash(const QString &key); #pragma warning( push ) #pragma warning( disable : 4311 ) // disable pointer truncation warning #endif -template inline uint qHash(const T *key) +template inline uint qHash(const T *key, uint seed = 0) { - return qHash(reinterpret_cast(key)); + return qHash(reinterpret_cast(key), seed); } #if defined(Q_CC_MSVC) #pragma warning( pop )