某条件下, cidx没有赋值, 下标志错误
This commit is contained in:
parent
411281d865
commit
211ab2661c
@ -129,10 +129,9 @@ func (h *Heap) Pop() (interface{}, bool) {
|
|||||||
cidx = c2
|
cidx = c2
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
cidx = c1
|
||||||
if c1 < h.size {
|
if c1 < h.size {
|
||||||
cvalue1 = h.elements[c1]
|
cvalue1 = h.elements[c1]
|
||||||
cidx = c1
|
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user