mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-09 08:24:10 -08:00
Merge pull request #115 from shannah/issue_112_part2
Fixed issue with size not being updated in TreeMap upon removal of so…
This commit is contained in:
commit
be8e84349a
|
@ -363,8 +363,8 @@ public class TTreeMap<K, V> extends TAbstractMap<K, V> implements TCloneable, TS
|
||||||
while (minDepth > 0) {
|
while (minDepth > 0) {
|
||||||
TreeNode<K, V> node = pathToMin[--minDepth];
|
TreeNode<K, V> node = pathToMin[--minDepth];
|
||||||
node.left = right;
|
node.left = right;
|
||||||
node.fix();
|
|
||||||
node = node.balance();
|
node = node.balance();
|
||||||
|
node.fix();
|
||||||
right = node;
|
right = node;
|
||||||
}
|
}
|
||||||
min.right = right;
|
min.right = right;
|
||||||
|
@ -372,6 +372,7 @@ public class TTreeMap<K, V> extends TAbstractMap<K, V> implements TCloneable, TS
|
||||||
root = min;
|
root = min;
|
||||||
root.fix();
|
root.fix();
|
||||||
}
|
}
|
||||||
|
root.fix();
|
||||||
return root.balance();
|
return root.balance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user