Commit 920dac9a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 311e0d84
...@@ -339,7 +339,7 @@ func (t *Tree) Delete(k interface{} /*K*/) (ok bool) { ...@@ -339,7 +339,7 @@ func (t *Tree) Delete(k interface{} /*K*/) (ok bool) {
// (no underflowX must be called ?) // (no underflowX must be called ?)
default: default:
p, pi := t.hitP, t.hitPi p, pi := t.hitP, t.hitPi
if p.c < kx && p != t.r { // XXX recheck && p != nil ? if p != nil && p.c < kx && p != t.r {
break break
} }
...@@ -408,7 +408,7 @@ func (t *Tree) Delete(k interface{} /*K*/) (ok bool) { ...@@ -408,7 +408,7 @@ func (t *Tree) Delete(k interface{} /*K*/) (ok bool) {
if !ok { if !ok {
t.hitD = x t.hitD = x
t.hitDi = i t.hitDi = i // XXX vs > h ?
return false return false
} }
...@@ -438,7 +438,10 @@ func (t *Tree) extract(q *d, i int) { // (r interface{} /*V*/) { ...@@ -438,7 +438,10 @@ func (t *Tree) extract(q *d, i int) { // (r interface{} /*V*/) {
q.d[q.c] = zde // GC q.d[q.c] = zde // GC
t.c-- t.c--
t.hitD = q t.hitD = q
t.hitDi = i // XXX ok (pointing post data ?) if i >= q.c {
i--
}
t.hitDi = i
return return
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment