Taken from Qt 4.7.2 sources ( /src/corelib/tools/qhash.cpp)
| 23 | |
| 24 | // Taken from Qt 4.7.2 sources (<Qt>/src/corelib/tools/qhash.cpp) |
| 25 | static uint hash(const uchar *p, int n) |
| 26 | { |
| 27 | uint h = 0; |
| 28 | |
| 29 | while (n--) { |
| 30 | h = (h << 4) + *p++; |
| 31 | h ^= (h & 0xf0000000) >> 23; |
| 32 | h &= 0x0fffffff; |
| 33 | } |
| 34 | return h; |
| 35 | } |
| 36 | |
| 37 | inline uint qHash(const double &d) |
| 38 | { |
no outgoing calls
no test coverage detected