Use QtPrivate::QHashCombine in qHash(QSslError)
It's the same operations as boost::hash_combine, but without explicit magic numbers. Change-Id: Id65b6f6b7be3070e4ec349ed0cc062af473a95b3 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
parent
90f668c79f
commit
a7e9fab3e9
|
|
@ -364,9 +364,9 @@ QSslCertificate QSslError::certificate() const
|
|||
*/
|
||||
uint qHash(const QSslError &key, uint seed) noexcept
|
||||
{
|
||||
// 2x boost::hash_combine inlined:
|
||||
seed ^= qHash(key.error()) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
seed ^= qHash(key.certificate()) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
QtPrivate::QHashCombine hash;
|
||||
seed = hash(seed, key.error());
|
||||
seed = hash(seed, key.certificate());
|
||||
return seed;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue