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

Function prio_queue_replace

prio-queue.c:106–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void prio_queue_replace(struct prio_queue *queue, void *thing)
107{
108 if (!queue->nr) {
109 prio_queue_put(queue, thing);
110 } else if (!queue->compare) {
111 queue->array[queue->nr - 1].ctr = queue->insertion_ctr++;
112 queue->array[queue->nr - 1].data = thing;
113 } else {
114 queue->array[0].ctr = queue->insertion_ctr++;
115 queue->array[0].data = thing;
116 sift_down_root(queue);
117 }
118}

Callers 4

pop_most_recent_commitFunction · 0.85
test_prio_queueFunction · 0.85
lazy_queue_putFunction · 0.85
join_revsFunction · 0.85

Calls 2

prio_queue_putFunction · 0.85
sift_down_rootFunction · 0.85

Tested by 1

test_prio_queueFunction · 0.68