src/corelib/tools/qhash.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/src/corelib/tools/qhash.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/corelib/tools/qhash.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -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