| 83 | |
| 84 | |
| 85 | __hot const StringTable::entry_t* StringTable::find(key_t key, hash_t hash) const noexcept { |
| 86 | assert_precondition(key.buf != nullptr); |
| 87 | assert_precondition(hash != hash_t::Empty); |
| 88 | size_t end = wrap(size_t(hash) + _maxDistance + 1); |
| 89 | for (size_t i = indexOfHash(hash); i != end; i = wrap(i + 1)) { |
| 90 | if (_hashes[i] == hash_t::Empty) |
| 91 | break; |
| 92 | else if (_hashes[i] == hash && _entries[i].first == key) |
| 93 | return &_entries[i]; |
| 94 | } |
| 95 | return nullptr; |
| 96 | } |
| 97 | |
| 98 | |
| 99 | __hot StringTable::insertResult StringTable::insert(key_t key, value_t value, hash_t hash) { |
no outgoing calls
no test coverage detected