MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / leafSplit

Method leafSplit

source/test/btree_test.cpp:348–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346 }
347
348 Maybe<Leaf> leafSplit(Leaf& leaf) {
349 if (leaf.count() <= maxLeafSize) {
350 return {};
351 } else {
352 Leaf right;
353 right.self = -1;
354
355 leaf.split(right, (leaf.count() + 1) / 2);
356
357 return right;
358 }
359 }
360
361 Pointer storeLeaf(Leaf leaf) {
362 if (leaf.self != -1)

Callers

nothing calls this directly

Calls 2

countMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected