Dale Weiler 3 năm trước cách đây
mục cha
commit
a996cfc536
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      core/slice/heap/heap.odin

+ 1 - 2
core/slice/heap/heap.odin

@@ -30,8 +30,7 @@ make :: proc(data: []$T, compare: $C) {
 
 	// start from data parent, no need to consider children
 	for start := (length - 2) / 2; start >= 0; start -= 1 {
-		sift_down(data, compare, start);
-		start -= 1;
+		sift_down(data, compare, start)
 	}
 }