[poincare] TreeHandle: Improve BuildWithBasicChildren

When building ghost nodes to stand as temporary children, we do not need
to move them are they are built sequentially after the built node.
This commit is contained in:
Émilie Feral
2019-02-19 14:31:02 +01:00
committed by LeaNumworks
parent fad3ad958d
commit 3adbca88d8

View File

@@ -195,7 +195,7 @@ TreeHandle TreeHandle::BuildWithBasicChildren(TreeNode * node, TreeHandle * chil
GhostNode * ghost = new (pool->alloc(sizeof(GhostNode))) GhostNode();
ghost->rename(pool->generateIdentifier(), false);
ghost->retain();
pool->move(node->next(), ghost, 0);
assert((char *)ghost == (char *)node->next() + i*sizeof(GhostNode));
}
node->rename(pool->generateIdentifier(), false);
TreeHandle h = TreeHandle(node);