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

Function compare

prio-queue.c:4–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "prio-queue.h"
3
4static inline int compare(struct prio_queue *queue, size_t i, size_t j)
5{
6 int cmp = queue->compare(queue->array[i].data, queue->array[j].data,
7 queue->cb_data);
8 if (!cmp)
9 cmp = (queue->array[i].ctr > queue->array[j].ctr) -
10 (queue->array[i].ctr < queue->array[j].ctr);
11 return cmp;
12}
13
14static inline void swap(struct prio_queue *queue, size_t i, size_t j)
15{

Callers 4

prio_queue_putFunction · 0.70
sift_down_rootFunction · 0.70
tree_searchFunction · 0.50
tree_insertFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected