Mercurial > hg > svcore
comparison base/Event.h @ 1802:c48548a85622
One last fix to this compatibility function (I hope!)
author | Chris Cannam |
---|---|
date | Thu, 10 Oct 2019 09:47:25 +0100 |
parents | af3f6c411a8e |
children | 6eb3a76c74f7 |
comparison
equal
deleted
inserted
replaced
1801:af3f6c411a8e | 1802:c48548a85622 |
---|---|
25 #include <stdexcept> | 25 #include <stdexcept> |
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 = 0) { |
31 uint h = seed; | 31 uint h = seed; |
32 const uchar *p = reinterpret_cast<const uchar *>(&key); | 32 const uchar *p = reinterpret_cast<const uchar *>(&key); |
33 for (size_t i = 0; i < sizeof(key); ++i) { | 33 for (size_t i = 0; i < sizeof(key); ++i) { |
34 h = 31 * h + p[i]; | 34 h = 31 * h + p[i]; |
35 } | 35 } |