Remove GPL heapify implementation
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 23 May 2011 16:13:26 +0000 (12:13 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 23 May 2011 16:13:26 +0000 (12:13 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/prio_heap/prio_heap.c

index 0c9bb607510829a0ee62bd3a919d41e4b4b7440e..ae47ebb8e4ba8f0b378e9a31b71b56ba4e4c207f 100644 (file)
@@ -40,24 +40,7 @@ void heap_free(struct ptr_heap *heap)
 
 static void heapify(struct ptr_heap *heap, int pos)
 {
-       void **ptrs = heap->ptrs;
-       void *p = ptrs[pos];
-
-       while (1) {
-               int left = 2 * pos + 1;
-               int right = 2 * pos + 2;
-               int largest = pos;
-               if (left < heap->size && heap->gt(ptrs[left], p))
-                       largest = left;
-               if (right < heap->size && heap->gt(ptrs[right], ptrs[largest]))
-                       largest = right;
-               if (largest == pos)
-                       break;
-               /* Push p down the heap one level and bump one up */
-               ptrs[pos] = ptrs[largest];
-               ptrs[largest] = p;
-               pos = largest;
-       }
+       /* TODO */
 }
 
 void *heap_replace_max(struct ptr_heap *heap, void *p)
This page took 0.026131 seconds and 4 git commands to generate.