| 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; |
no test coverage detected