PebbleOS
Loading...
Searching...
No Matches
Typedefs | Functions
Ordering

Comparator type used by the sorted containers. More...

Typedefs

typedef int(* Comparator) (void *a, void *b)
 Compare two items.
 

Functions

int uint32_comparator (void *a, void *b)
 Comparator for uint32_t items.
 

Detailed Description

Comparator type used by the sorted containers.

Typedef Documentation

◆ Comparator

typedef int(* Comparator) (void *a, void *b)

Compare two items.

Note the sign convention, opposite to qsort().

Parameters
aFirst item.
bSecond item.
Returns
Negative if a > b, positive if b > a, 0 if equal.

Function Documentation

◆ uint32_comparator()

int uint32_comparator ( void *  a,
void *  b 
)

Comparator for uint32_t items.

Parameters
aPointer to the first uint32_t.
bPointer to the second uint32_t.
Returns
Negative if a > b, positive if b > a, 0 if equal.