| 358 | class AllocationPolicy> |
| 359 | template <typename LookupKey> |
| 360 | typename TemplateHashMapImpl<Key, Value, MatchFun, AllocationPolicy>::Entry* |
| 361 | TemplateHashMapImpl<Key, Value, MatchFun, AllocationPolicy>::Probe( |
| 362 | const LookupKey& key, uint32_t hash) const { |
| 363 | DCHECK(base::bits::IsPowerOfTwo(capacity())); |
| 364 | size_t i = hash & (capacity() - 1); |
| 365 | DCHECK(i < capacity()); |
| 366 | |
| 367 | DCHECK(occupancy() < capacity()); // Guarantees loop termination. |
| 368 | Entry* map = impl_.map_; |
| 369 | while (map[i].exists() && |
| 370 | !impl_.match()(hash, map[i].hash, key, map[i].key)) { |
| 371 | i = (i + 1) & (capacity() - 1); |
| 372 | } |
| 373 | |
| 374 | return &map[i]; |
| 375 | } |
| 376 | |
| 377 | template <typename Key, typename Value, typename MatchFun, |
| 378 | class AllocationPolicy> |
nothing calls this directly
no test coverage detected