QHostAddress hashing: use qHashBits
Instead of constructing a temporary QByteArray, which could conceivably fail, to hash those bits. Change-Id: I7de033f80b0e4431b7f1ffff13fa376302d9720f Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
3ae90ed371
commit
dbcf5730ac
@ -1129,7 +1129,7 @@ uint qHash(const QHostAddress &key, uint seed)
|
|||||||
{
|
{
|
||||||
// both lines might throw
|
// both lines might throw
|
||||||
QT_ENSURE_PARSED(&key);
|
QT_ENSURE_PARSED(&key);
|
||||||
return qHash(QByteArray::fromRawData(reinterpret_cast<const char *>(key.d->a6.c), 16), seed);
|
return qHashBits(key.d->a6.c, 16, seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_DATASTREAM
|
#ifndef QT_NO_DATASTREAM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user