mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 03:29:16 +02:00
Use propper qHash return values on Qt6
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
#include <QString>
|
||||
#include <QCache>
|
||||
#include <QByteArray>
|
||||
#include "common/config.h"
|
||||
|
||||
class QString;
|
||||
class Coordinates;
|
||||
@ -37,12 +38,12 @@ public:
|
||||
static void setDir(const QString &path);
|
||||
static qreal elevation(const Coordinates &c);
|
||||
|
||||
friend uint qHash(const Key &key);
|
||||
friend HASH_T qHash(const Key &key);
|
||||
};
|
||||
|
||||
inline uint qHash(const DEM::Key &key)
|
||||
inline HASH_T qHash(const DEM::Key &key)
|
||||
{
|
||||
return (key.lon() ^ key.lat());
|
||||
return (qHash(key.lon()) ^ qHash(key.lat()));
|
||||
}
|
||||
|
||||
#endif // DEM_H
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <QHash>
|
||||
#include <QVector>
|
||||
#include <QDebug>
|
||||
#include "common/config.h"
|
||||
#include "common/coordinates.h"
|
||||
#include "imageinfo.h"
|
||||
#include "link.h"
|
||||
@ -68,7 +69,7 @@ private:
|
||||
static bool _show2ndElevation;
|
||||
};
|
||||
|
||||
inline uint qHash(const Waypoint &key)
|
||||
inline HASH_T qHash(const Waypoint &key)
|
||||
{
|
||||
return ::qHash(key.name());
|
||||
}
|
||||
|
Reference in New Issue
Block a user