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

Method mutableCopy

Fleece/Tree/MutableNode.hh:346–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344 }
345
346 static MutableInterior* mutableCopy(const Interior *iNode, unsigned extraCapacity =0) {
347 auto childCount = iNode->childCount();
348 auto node = newNode(childCount + extraCapacity);
349 node->_bitmap = asBitmap(iNode->bitmap());
350 for (unsigned i = 0; i < childCount; ++i)
351 node->_children[i] = NodeRef(iNode->childAtIndex(i));
352 return node;
353 }
354
355 static MutableInterior* promoteLeaf(NodeRef& childLeaf, unsigned shift) {
356 unsigned level = shift / kBitShift;

Callers 2

getMutableArrayMethod · 0.45
getMutableDictMethod · 0.45

Calls 5

asBitmapFunction · 0.85
bitmapMethod · 0.80
NodeRefClass · 0.70
childCountMethod · 0.45
childAtIndexMethod · 0.45

Tested by

no test coverage detected