summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-03 12:12:07 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-03 12:12:07 (GMT)
commita9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e (patch)
tree39a419cdf8f6ee8452280531d2463c470c8e0710 /src/corelib/tools/qhash.cpp
parentad46fadbe343e1b6caf94823237064551ab53c52 (diff)
parent787a20b76b7f6e0dd6c7a6331220b46b5eddff79 (diff)
downloadQt-a9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e.zip
Qt-a9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e.tar.gz
Qt-a9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: revert to fromUtf16() usage in fromWCharArray() Assistant examples: Fix missing QLatin1String. Added Czech translations. Webkit: Fix missing namespace. qmake: subdirs template: make distclean target use QMAKE_DISTCLEAN qmake: fix warnings qmake: Remove macro and simplify string expression previously using it qmake: use isActiveConfig() instead of hand-crafting comparisons Fix missing namespace. Assistant: Fix spelling mistakes. Assistant: Use const references in foreach loops. optimization: get rid of QString::fromUtf16() usage document QString::fromUtf16() slowness remove duplicated calculation of length remove pointless conditionals micro-optimization optimize qhash() Designer/uic/related examples: Fix source code scanning issues II.
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;