1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +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:
Vasiliy Bout 2010-03-02 15:34:19 +00:00
parent fd6a0d07bf
commit 649f0d4bfa

View file

@ -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() {