Use statically-known numChildren in Node3 -> Node16
This commit is contained in:
@@ -348,7 +348,8 @@ inline void Node16::copyChildrenAndKeyFrom(const Node3 &other) {
|
||||
memcpy(index, other.index, Node3::kMaxNodes);
|
||||
memcpy(children, other.children, Node3::kMaxNodes * sizeof(Child));
|
||||
memcpy(partialKey(), &other + 1, partialKeyLen);
|
||||
for (int i = 0; i < numChildren; ++i) {
|
||||
assert(numChildren == Node3::kMaxNodes);
|
||||
for (int i = 0; i < Node3::kMaxNodes; ++i) {
|
||||
assert(children[i].child->parent == &other);
|
||||
children[i].child->parent = this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user