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>
This commit is contained in:
Friedemann Kleint 2012-07-30 15:25:25 +02:00 committed by Qt by Nokia
parent 47c48ea87a
commit b5ad1fcd08

View File

@ -103,6 +103,8 @@ template <class T> inline uint qHash(const T *key, uint seed = 0)
#pragma warning( pop ) #pragma warning( pop )
#endif #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) template <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &key, uint seed = 0)
{ {
uint h1 = qHash(key.first, seed); 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; 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 Q_CORE_EXPORT QHashData
{ {
struct Node { struct Node {