| 2060 | */ |
| 2061 | template <typename Visitor> |
| 2062 | auto walkBucketChain(unsigned int hash, const Visitor& visitor) const->decltype(visitor(0, nullptr)) |
| 2063 | { |
| 2064 | unsigned short bucketIndex = m_firstBucketForHash[hash % bucketHashSize]; |
| 2065 | |
| 2066 | while (bucketIndex) { |
| 2067 | auto* bucketPtr = bucketForIndex(bucketIndex); |
| 2068 | |
| 2069 | if (auto visitResult = visitor(bucketIndex, bucketPtr)) { |
| 2070 | return visitResult; |
| 2071 | } |
| 2072 | |
| 2073 | bucketIndex = bucketPtr->nextBucketForHash(hash); |
| 2074 | } |
| 2075 | |
| 2076 | return {}; // clazy:exclude=returning-void-expression |
| 2077 | } |
| 2078 | |
| 2079 | ///Makes sure the order within m_freeSpaceBuckets is correct, after largestFreeSize has been changed for m_freeSpaceBuckets[index]. |
| 2080 | ///If too few space is free within the given bucket, it is removed from m_freeSpaceBuckets. |
nothing calls this directly
no test coverage detected