projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bug 531
[org.ibex.core.git]
/
src
/
org
/
ibex
/
util
/
BalancedTree.java
diff --git
a/src/org/ibex/util/BalancedTree.java
b/src/org/ibex/util/BalancedTree.java
index
615db24
..
7d1c341
100644
(file)
--- a/
src/org/ibex/util/BalancedTree.java
+++ b/
src/org/ibex/util/BalancedTree.java
@@
-223,10
+223,8
@@
public class BalancedTree {
int c = left[d];
if (d <= 0) throw new Error("rotation error");
left[d] = b;
- if(size[b] <= 3) // b is now a leaf
- right[b] = -d;
- else
- right[b] = c;
+ right[b] = c <= 0 ? -d : c;
+
parent[b] = d;
parent[d] = p;
if(c > 0) parent[c] = b;