| 1063 | } |
| 1064 | |
| 1065 | void 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 | |
| 1077 | void BTreeDatabase::doCommit() { |
| 1078 | if (m_availableBlocks.empty() && m_uncommitted.empty()) |