summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-07-30 15:25:25 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-01 00:14:41 +0200
commitb5ad1fcd084d1fa8fe3d0869e119b12d7556857b (patch)
treeda9b59424e876e04e49f847776773ce36fbb2895 /src/corelib
parent47c48ea87ae836b1c22255744ec2ef8aacdb61af (diff)
Fix compilation: Move qHash(const T &t, uint seed) up.
It needs to be visible from qHash(const QPair<T1, T2> &key, uint seed). Change-Id: Ibb63ce6da1e655bfb841c5e580e184ef66c5b766 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qhash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 0c322cddcf..80ed456ace 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -103,6 +103,8 @@ template <class T> inline uint qHash(const T *key, uint seed = 0)
#pragma warning( pop )
#endif
+template<typename T> inline uint qHash(const T &t, uint seed) { return (qHash(t) ^ seed); }
+
template <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &key, uint seed = 0)
{
uint h1 = qHash(key.first, seed);
@@ -110,8 +112,6 @@ template <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &key,
return ((h1 << 16) | (h1 >> 16)) ^ h2 ^ seed;
}
-template<typename T> inline uint qHash(const T &t, uint seed) { return (qHash(t) ^ seed); }
-
struct Q_CORE_EXPORT QHashData
{
struct Node {