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

Method readRoot

source/core/StarBTreeDatabase.cpp:1065–1075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1063}
1064
1065void BTreeDatabase::readRoot() {
1066 DataStreamIODevice ds(m_device);
1067 ds.seek(BTreeRootSelectorBit);
1068 ds.read(m_usingAltRoot);
1069
1070 ds.seek(BTreeRootInfoStart + (m_usingAltRoot ? BTreeRootInfoSize : 0));
1071 m_headFreeIndexBlock = ds.read<BlockIndex>();
1072 m_deviceSize = ds.read<StreamOffset>();
1073 m_root = ds.read<BlockIndex>();
1074 m_rootIsLeaf = ds.read<bool>();
1075}
1076
1077void BTreeDatabase::doCommit() {
1078 if (m_availableBlocks.empty() && m_uncommitted.empty())

Callers

nothing calls this directly

Calls 2

seekMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected