diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-09-09 01:23:18 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-09-12 09:57:59 +0200 |
commit | a24566a338eaf696df161f708b3dd67bfbbf034d (patch) | |
tree | 32d00fbaa2f48df405a6b4cd258538efc3c79201 /src/corelib/tools/qhash.cpp | |
parent | d04c2fbc1d49c3b265111dae28df06c431d71b3a (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 4 |
1 files changed, 1 insertions, 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<quintptr>(&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; |