Added assert

This commit is contained in:
Sebastian Messmer 2015-02-26 18:53:24 +01:00
parent 4e8e4ea3d3
commit 7de4948256

View File

@ -196,6 +196,7 @@ void DataTree::resizeNumBytes(uint64_t newNumBytes) {
}
uint32_t newLastLeafSize = newNumBytes - (newNumLeaves-1)*_nodeStore->layout().maxBytesPerLeaf();
LastLeaf(_rootNode.get())->resize(newLastLeafSize);
assert(newNumBytes == numStoredBytes());
}
optional_ownership_ptr<DataLeafNode> DataTree::LastLeaf(DataNode *root) {