QHash: fix constness for heterogenous lookup functions
Change-Id: I161237fc243ebcf48e1318dae045f2e812796786 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 205edd15070720ce94ef5ba7d7e32b0b715abcf9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
48c8eef930
commit
df6d88ea2c
@ -1387,11 +1387,11 @@ public:
|
||||
{
|
||||
return takeImpl(key);
|
||||
}
|
||||
bool contains(const QHashPrivate::HeterogeneouslySearchableWith<Key> auto &key)
|
||||
bool contains(const QHashPrivate::HeterogeneouslySearchableWith<Key> auto &key) const
|
||||
{
|
||||
return d ? d->findNode(key) != nullptr : false;
|
||||
}
|
||||
qsizetype count(const QHashPrivate::HeterogeneouslySearchableWith<Key> auto &key)
|
||||
qsizetype count(const QHashPrivate::HeterogeneouslySearchableWith<Key> auto &key) const
|
||||
{
|
||||
return contains(key) ? 1 : 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user