comparison base/Event.h @ 1801:af3f6c411a8e

*sigh*
author Chris Cannam
date Thu, 10 Oct 2019 09:34:12 +0100
parents 705ea8699d49
children c48548a85622
comparison
equal deleted inserted replaced
1800:705ea8699d49 1801:af3f6c411a8e
26 26
27 #include <QString> 27 #include <QString>
28 28
29 #if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0)) 29 #if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
30 uint qHash(float key, uint seed) { 30 uint qHash(float key, uint seed) {
31 return key != 0.0f ? 31 uint h = seed;
32 qHash(reinterpret_cast<const uchar *>(&key), sizeof(key), seed) : 32 const uchar *p = reinterpret_cast<const uchar *>(&key);
33 seed; 33 for (size_t i = 0; i < sizeof(key); ++i) {
34 h = 31 * h + p[i];
35 }
36 return h;
34 } 37 }
35 #endif 38 #endif
36 39
37 /** 40 /**
38 * An immutable(-ish) type used for point and event representation in 41 * An immutable(-ish) type used for point and event representation in