src/corelib/tools/qhash.cpp
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
--- a/src/corelib/tools/qhash.cpp	Mon Jun 21 22:38:13 2010 +0100
+++ b/src/corelib/tools/qhash.cpp	Thu Jul 22 16:41:55 2010 +0100
@@ -64,13 +64,11 @@
 static uint hash(const uchar *p, int n)
 {
     uint h = 0;
-    uint g;
 
     while (n--) {
         h = (h << 4) + *p++;
-        g = h & 0xf0000000;
-        h ^= g >> 23;
-        h &= ~g;
+        h ^= (h & 0xf0000000) >> 23;
+        h &= 0x0fffffff;
     }
     return h;
 }
@@ -78,13 +76,11 @@
 static uint hash(const QChar *p, int n)
 {
     uint h = 0;
-    uint g;
 
     while (n--) {
         h = (h << 4) + (*p++).unicode();
-        g = h & 0xf0000000;
-        h ^= g >> 23;
-        h &= ~g;
+        h ^= (h & 0xf0000000) >> 23;
+        h &= 0x0fffffff;
     }
     return h;
 }
@@ -847,6 +843,11 @@
     \internal
 */
 
+/*! \fn bool QHash::isSharedWith(const QHash<Key, T> &other) const
+
+    \internal
+*/
+
 /*! \fn void QHash::clear()
 
     Removes all items from the hash.
@@ -1665,7 +1666,7 @@
     This function requires the key and value types to implement \c
     operator<<().
 
-    \sa {Format of the QDataStream operators}
+    \sa {Serializing Qt Data Types}
 */
 
 /*! \fn QDataStream &operator>>(QDataStream &in, QHash<Key, T> &hash)
@@ -1676,7 +1677,7 @@
     This function requires the key and value types to implement \c
     operator>>().
 
-    \sa {Format of the QDataStream operators}
+    \sa {Serializing Qt Data Types}
 */
 
 /*! \class QMultiHash