added qhash functions for timerange and rational

So these keys can be used in QHash containers, they need functions for how to
create those hashes.
This commit is contained in:
itsmattkc
2019-11-15 13:55:05 +09:00
parent 336b3a8e05
commit 16f80386e8
4 changed files with 17 additions and 9 deletions
+5
View File
@@ -421,3 +421,8 @@ QDebug operator<<(QDebug debug, const rational &r)
debug.nospace() << r.numerator() << "/" << r.denominator();
return debug.space();
}
uint qHash(const rational &r, uint seed)
{
return qHash(r.toDouble(), seed);
}