From a24566a338eaf696df161f708b3dd67bfbbf034d Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 9 Sep 2014 01:23:18 +0200 Subject: [PATCH] QHash: remove unnecessary #ifdef There's no need to use a macro here, since we can just store the pointer value in a qulonglong and have the second shift operation be done unconditionally. For 32-bit platforms, it will yield 0, and xor'ing it into 'seed' will have no effect. Change-Id: I3e63bd504e81c84d13935d5503c3707d40d74d6f Reviewed-by: Thiago Macieira --- src/corelib/tools/qhash.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index c9271848ec..2cfc815672 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -267,9 +267,7 @@ static uint qt_create_qhash_seed() quintptr seedPtr = reinterpret_cast(&seed); seed ^= seedPtr; -#if QT_POINTER_SIZE == 8 - seed ^= (seedPtr >> 32); -#endif + seed ^= (qulonglong(seedPtr) >> 32); // no-op on 32-bit platforms #endif // QT_BOOTSTRAPPED return seed;