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

Method grow

Fleece/Tree/MutableNode.hh:374–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372
373
374 MutableInterior* grow() {
375 assert_precondition(capacity() < kMaxChildren);
376 auto replacement = (MutableInterior*)realloc(this,
377 sizeof(MutableInterior) + (capacity()+1)*sizeof(NodeRef));
378 if (!replacement)
379 throw std::bad_alloc();
380 replacement->_capacity++;
381 return replacement;
382 }
383
384
385 static unsigned childBitNumber(hash_t hash, unsigned shift =0) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected