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

Method grow

Fleece/Support/StringTable.cc:210–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209
210 __hot void StringTable::grow() {
211 auto oldSize = _size;
212 auto oldHashes = _hashes;
213 auto oldEntries = _entries;
214 auto wasAllocated = _allocated;
215
216 allocTable(2 * oldSize);
217
218 for (size_t i = 0; i < oldSize; ++i) {
219 if (oldHashes[i] != hash_t::Empty)
220 _insertOnly(oldHashes[i], oldEntries[i]);
221 }
222 if (wasAllocated)
223 free(oldHashes);
224 }
225
226
227 void StringTable::dump() const noexcept {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected