fix: improve deletion

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2022-05-16 18:44:24 +02:00
parent 43ade1120b
commit 991388604f
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -139,13 +139,14 @@ class RankedTree {
successor.value = null; successor.value = null;
this.record( this.record(
"Replacing the value of deleted node with successor value", "Replacing the value of deleted node with successor value",
node node,
successor
); );
return this.deleteNode(successor); return this.deleteNode(successor);
} }
this.record("Replacing the node with one of its children", node); this.record("Replacing the node with one of its children", node, y);
return [y, parent]; return [y, parent];
} }