mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
[poincare] Fix TreeReference::replaceTreeChildAtIndex
This commit is contained in:
@@ -185,7 +185,9 @@ public:
|
||||
assert(oldChildIndex >= 0 && oldChildIndex < numberOfChildren());
|
||||
TreeReference<T> oldChild = treeChildAtIndex(oldChildIndex);
|
||||
TreePool::sharedPool()->move(oldChild.node()->next(), newChild.node());
|
||||
newChild.node()->retain();
|
||||
if (!p.isDefined()) {
|
||||
newChild.node()->retain();
|
||||
}
|
||||
TreePool::sharedPool()->move(TreePool::sharedPool()->last(), oldChild.node());
|
||||
oldChild.node()->release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user