pike.git / lib / modules / ADT.pmod / Heap.pike

version» Context lines:

pike.git/lib/modules/ADT.pmod/Heap.pike:16: Inside #if defined(DEBUG)
   if(values[(e-1)/2] > values[e])    error("Error in HEAP (%d, %d) num_values=%d\n",    (e-1)/2, e, num_values);   }   #else   #define verify_heap()   #endif      static void adjust_down(int elem)   { -  int steps; +     while(1)    {    int child=elem*2+1;    if(child >= num_values) break;       if(child+1==num_values || values[child] < values[child+1])    {    if(values[child] < values[elem])    {    SWAP(child, elem);