MCPcopy Index your code
hub / github.com/git/git / prio_queue_reverse

Function prio_queue_reverse

prio-queue.c:19–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19void prio_queue_reverse(struct prio_queue *queue)
20{
21 size_t i, j;
22
23 if (queue->compare)
24 BUG("prio_queue_reverse() on non-LIFO queue");
25 if (!queue->nr)
26 return;
27 for (i = 0; i < (j = (queue->nr - 1) - i); i++)
28 swap(queue, i, j);
29}
30
31void clear_prio_queue(struct prio_queue *queue)
32{

Callers 3

init_topo_walkFunction · 0.85
test_prio_queueFunction · 0.85

Calls 1

swapFunction · 0.85

Tested by 1

test_prio_queueFunction · 0.68