From 3adbca88d834081e9cfed0ee0533bb33547ad461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 19 Feb 2019 14:31:02 +0100 Subject: [PATCH] [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. --- poincare/src/tree_handle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poincare/src/tree_handle.cpp b/poincare/src/tree_handle.cpp index 7493b56b4..15dcbd51c 100644 --- a/poincare/src/tree_handle.cpp +++ b/poincare/src/tree_handle.cpp @@ -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);