diff --git a/src/heaps/mutable_binary_heap.jl b/src/heaps/mutable_binary_heap.jl index abc87d0d6..56be6b0e6 100644 --- a/src/heaps/mutable_binary_heap.jl +++ b/src/heaps/mutable_binary_heap.jl @@ -136,10 +136,10 @@ function _make_mutable_binary_heap(ord::Ordering, ty::Type{T}, values) where T n = length(values) nodes = Vector{MutableBinaryHeapNode{T}}(undef, n) nodemap = Vector{Int}(undef, n) - values = heapify!(values, ord) + valtree = heapify!(values, ord) i::Int = 0 - for v in values + for v in valtree i += 1 @inbounds nodes[i] = MutableBinaryHeapNode{T}(v, i) @inbounds nodemap[i] = i