summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r--src/corelib/tools/qhash.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index d758325..6231471 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -68,8 +68,8 @@ static uint hash(const uchar *p, int n)
while (n--) {
h = (h << 4) + *p++;
- if ((g = (h & 0xf0000000)) != 0)
- h ^= g >> 23;
+ g = h & 0xf0000000;
+ h ^= g >> 23;
h &= ~g;
}
return h;
@@ -82,8 +82,8 @@ static uint hash(const QChar *p, int n)
while (n--) {
h = (h << 4) + (*p++).unicode();
- if ((g = (h & 0xf0000000)) != 0)
- h ^= g >> 23;
+ g = h & 0xf0000000;
+ h ^= g >> 23;
h &= ~g;
}
return h;