diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2020-05-16 22:27:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 22:27:38 +0200 |
commit | adef9be898fb7803c0d8b5b23a3aae655bdb00ce (patch) | |
tree | 29b001d0039ca9684aeaf036edb56b0b4686a3e5 /src/track | |
parent | 1460d0f1b05e54a599bde7ddaed4ed6f6cecc6b7 (diff) | |
parent | 09bb5400ba953e3c4dece221d0a2b5c3b56aae51 (diff) |
Merge pull request #2762 from uklotzde/qhash
Fix qHash definitions
Diffstat (limited to 'src/track')
-rw-r--r-- | src/track/trackfile.h | 4 | ||||
-rw-r--r-- | src/track/trackref.h | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/track/trackfile.h b/src/track/trackfile.h index 96c73f4a3a..7e037840a9 100644 --- a/src/track/trackfile.h +++ b/src/track/trackfile.h @@ -124,6 +124,8 @@ inline QDebug operator<<(QDebug debug, const TrackFile& trackFile) { #endif } -inline uint qHash(const TrackFile& key, uint seed) { +inline uint qHash( + const TrackFile& key, + uint seed = 0) { return qHash(key.location(), seed); } diff --git a/src/track/trackref.h b/src/track/trackref.h index 7a60e045ce..ef238dad0e 100644 --- a/src/track/trackref.h +++ b/src/track/trackref.h @@ -116,6 +116,10 @@ std::ostream& operator<<(std::ostream& os, const TrackRef& trackRef); QDebug operator<<(QDebug debug, const TrackRef& trackRef); -inline uint qHash(const TrackRef& key, uint seed) { - return qHash(key.getLocation(), seed) ^ qHash(key.getId(), seed); +inline uint qHash( + const TrackRef& key, + uint seed = 0) { + return qHash( + key.getLocation(), seed) ^ + qHash(key.getId(), seed); } |