Dale Weiler 3 年之前
父节点
当前提交
a996cfc536
共有 1 个文件被更改,包括 1 次插入2 次删除
  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)
 	}
 }