mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 19:42:17 +02:00
ZLTree clear() bugfix
git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1072 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
fd6a0d07bf
commit
649f0d4bfa
1 changed files with 4 additions and 0 deletions
|
@ -108,8 +108,12 @@ public abstract class ZLTree<T extends ZLTree> implements Iterable<T> {
|
|||
}
|
||||
|
||||
public final void clear() {
|
||||
final int subTreesSize = mySize - 1;
|
||||
mySubTrees = null;
|
||||
mySize = 1;
|
||||
for (ZLTree parent = Parent; parent != null; parent = parent.Parent) {
|
||||
parent.mySize -= subTreesSize;
|
||||
}
|
||||
}
|
||||
|
||||
public final Iterator<T> iterator() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue