From 211ab2661c6f6c9e33f5107d7b6b8eb2ae089799 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Thu, 1 Aug 2019 10:36:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=90=E6=9D=A1=E4=BB=B6=E4=B8=8B,=20cidx?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=B5=8B=E5=80=BC,=20=E4=B8=8B=E6=A0=87?= =?UTF-8?q?=E5=BF=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tree/heap/heap.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tree/heap/heap.go b/tree/heap/heap.go index b471dc0..df876aa 100644 --- a/tree/heap/heap.go +++ b/tree/heap/heap.go @@ -129,10 +129,9 @@ func (h *Heap) Pop() (interface{}, bool) { cidx = c2 } } else { - + cidx = c1 if c1 < h.size { cvalue1 = h.elements[c1] - cidx = c1 } else { break }