QHash: fix constness for heterogenous lookup functions
Pick-to: 6.8 Change-Id: I161237fc243ebcf48e1318dae045f2e812796786 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
31d3e57342
commit
205edd1507
@ -1395,11 +1395,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