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

Method leafSize

source/core/StarBTreeDatabase.cpp:971–978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

969}
970
971uint32_t BTreeDatabase::leafSize(shared_ptr<LeafNode> const& leaf) const {
972 size_t s = 6;
973 for (LeafNode::ElementList::iterator i = leaf->elements.begin(); i != leaf->elements.end(); ++i) {
974 s += m_keySize;
975 s += dataSize(i->data);
976 }
977 return s;
978}
979
980uint32_t BTreeDatabase::maxIndexPointers() const {
981 // 2 for magic, 1 byte for level, sizeof(BlockIndex) for beginPointer, 4

Callers 2

leafNeedsShiftMethod · 0.80
leafShiftMethod · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected