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

Method promoteLeaf

Fleece/Tree/MutableNode.hh:355–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353 }
354
355 static MutableInterior* promoteLeaf(NodeRef& childLeaf, unsigned shift) {
356 unsigned level = shift / kBitShift;
357 MutableInterior* node = newNode(2 + (level<1) + (level<3));
358 unsigned childBitNo = childBitNumber(childLeaf.hash(), shift+kBitShift);
359 node = node->addChild(childBitNo, childLeaf);
360 return node;
361 }
362
363 MutableInterior(unsigned cap, MutableInterior* orig =nullptr)
364 :MutableNode(cap)

Callers

nothing calls this directly

Calls 2

addChildMethod · 0.80
hashMethod · 0.45

Tested by

no test coverage detected