Fix for instantiating BinaryHeap!(Array!int))

This commit is contained in:
Xinok 2015-07-08 15:10:11 -05:00
parent d52fb87ce7
commit 08f0b242d5
2 changed files with 13 additions and 9 deletions

View file

@ -1185,7 +1185,7 @@ package(std) template HeapOps(alias less, Range)
if(r.length < 2) return;
// Build Heap
heapify(r);
buildHeap(r);
// Sort
size_t i = r.length - 1;
@ -1198,7 +1198,7 @@ package(std) template HeapOps(alias less, Range)
}
//template because of @@@12410@@@
void heapify()(Range r)
void buildHeap()(Range r)
{
size_t i = r.length / 2;
while(i > 0) percolate(r, --i, r.length);