mirror of
https://github.com/dlang/phobos.git
synced 2025-05-04 09:00:22 +03:00
Fix for instantiating BinaryHeap!(Array!int))
This commit is contained in:
parent
d52fb87ce7
commit
08f0b242d5
2 changed files with 13 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue