mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 09:05:14 +01:00
Use as much as possible of the 64b hash in Qt6
This commit is contained in:
parent
9b3c11cc68
commit
60e83b24f9
@ -6,13 +6,13 @@
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#define HASH_T uint
|
||||
|
||||
inline uint qHash(const QPoint &p)
|
||||
{
|
||||
return qHash(QPair<int, int>(p.x(), p.y()));
|
||||
}
|
||||
#else // QT6
|
||||
#define HASH_T size_t
|
||||
#endif // QT6
|
||||
|
||||
inline HASH_T qHash(const QPoint &p)
|
||||
{
|
||||
return ::qHash(p.x()) ^ ::qHash(p.y());
|
||||
}
|
||||
|
||||
#endif // HASH_H
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "common/rectc.h"
|
||||
#include "common/garmin.h"
|
||||
#include "common/hash.h"
|
||||
#include "deltastream.h"
|
||||
#include "huffmanstream.h"
|
||||
#include "style.h"
|
||||
@ -15,10 +16,8 @@ using namespace IMG;
|
||||
|
||||
static quint64 pointId(const QPoint &pos, quint32 type)
|
||||
{
|
||||
quint64 id;
|
||||
|
||||
uint hash = (uint)qHash(QPair<int, int>(pos.x(), pos.y()));
|
||||
id = ((quint64)type)<<32 | hash;
|
||||
quint64 hash = qHash(pos);
|
||||
quint64 id = ((quint64)type)<<40 | (hash & 0xFFFFFFFFFF);
|
||||
|
||||
// Increase rendering priorities for some special items
|
||||
if (!Style::isCountry(type) && !Style::isMarina(type))
|
||||
|
Loading…
x
Reference in New Issue
Block a user