1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-28 03:59:15 +02:00

Use propper qHash return values on Qt6

This commit is contained in:
2021-01-10 13:23:43 +01:00
parent 7a664342b6
commit 815071fc55
6 changed files with 23 additions and 11 deletions

View File

@ -3,6 +3,7 @@
#include <QString>
#include <QDebug>
#include "common/config.h"
#define FIRST_SHIELD Label::Shield::USInterstate
#define LAST_SHIELD Label::Shield::Oval
@ -52,9 +53,9 @@ private:
Shield _shield;
};
inline uint qHash(const Label::Shield &shield)
inline HASH_T qHash(const Label::Shield &shield)
{
return qHash(shield.text()) ^ shield.type();
return qHash(shield.text()) ^ qHash(shield.type());
}
#ifndef QT_NO_DEBUG

View File

@ -6,6 +6,7 @@
#include <QSet>
#include <QList>
#include <QHash>
#include "common/config.h"
#include "common/rectc.h"
#include "common/kv.h"
#include "projection.h"
@ -169,16 +170,16 @@ private:
bool _valid, _ready;
QString _errorString;
friend uint qHash(const WMTS::TileMatrix &key);
friend uint qHash(const WMTS::MatrixLimits &key);
friend HASH_T qHash(const WMTS::TileMatrix &key);
friend HASH_T qHash(const WMTS::MatrixLimits &key);
};
inline uint qHash(const WMTS::TileMatrix &key)
inline HASH_T qHash(const WMTS::TileMatrix &key)
{
return ::qHash(key.id);
}
inline uint qHash(const WMTS::MatrixLimits &key)
inline HASH_T qHash(const WMTS::MatrixLimits &key)
{
return ::qHash(key.id);
}