Continue addition simplification

This commit is contained in:
Léa Saviot
2018-07-02 11:49:01 +02:00
parent 2590133040
commit 9fc488f22f
6 changed files with 68 additions and 26 deletions

View File

@@ -181,3 +181,13 @@ void TreeNode::replaceWithAllocationFailure() {
t.replaceWithAllocationFailure();
// TODO: OK to change the memory while executing from it, even though we know it will stop execution just after ?
}
void TreeNode::addChildAtIndex(TreeNode * t, int index) {
TreeRef tr(this);
tr.addChildAtIndex(TreeRef(t), index);
}
void TreeNode::removeChild(TreeNode * t) {
TreeRef tr(this);
tr.removeChild(TreeRef(t));
}