From f28e029bb4f40887e071361dc8fe1383ecaab667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Fri, 3 Aug 2018 15:18:27 +0200 Subject: [PATCH] [poincare] Change misleading variable name --- poincare/src/tree_reference.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poincare/src/tree_reference.cpp b/poincare/src/tree_reference.cpp index 57d0f51a2..2636a1f35 100644 --- a/poincare/src/tree_reference.cpp +++ b/poincare/src/tree_reference.cpp @@ -31,15 +31,15 @@ void TreeReference::detachChild(TreeReference t, int childNumberOfChildren) { assert(isDefined()); // Replace the child with a ghost node TreeNode * staticGhostNode = t.node()->ghostStaticNode(); - TreeNode * newGhostStaticNode = TreePool::sharedPool()->deepCopy(staticGhostNode); - if (newGhostStaticNode == nullptr) { + TreeNode * newGhostNode = TreePool::sharedPool()->deepCopy(staticGhostNode); + if (newGhostNode == nullptr) { t.replaceWithAllocationFailure(t.numberOfChildren()); return; } // Put the ghost next to the child to detach - newGhostStaticNode->retain(); - TreePool::sharedPool()->move(t.node(), newGhostStaticNode, 0); + newGhostNode->retain(); + TreePool::sharedPool()->move(t.node(), newGhostNode, 0); // Move the child to detach TreePool::sharedPool()->move(TreePool::sharedPool()->last(), t.node(), t.numberOfChildren());