MCPcopy Create free account
hub / github.com/couchbase/fleece / find

Method find

Fleece/Support/StringTable.cc:85–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers 15

containsMethod · 0.45
MDictClass · 0.45
setMethod · 0.45
readMethod · 0.45
_findValueForMethod · 0.45
HeapDict.ccFile · 0.45
getMethod · 0.45
removeMethod · 0.45
disconnectFromSourceMethod · 0.45
diff_computeMethod · 0.45
diff_commonOverlapMethod · 0.45
diff_halfMatchIMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected