avutil/tree: add additional const qualifier to the comparator

libc's qsort comparator has a const qualifier on both arguments. This
adds a missing const qualifier to exactly match the comparator API.

Existing usages of av_tree_find, av_tree_insert are appropriately
modified: type signature changes of the comparators, and removal of
unnecessary void * casts of function pointers.

Reviewed-by: Henrik Gramner <henrik@gramner.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
Ganesh Ajjanagadde
2015-10-24 17:53:21 -04:00
parent 94f333f9dc
commit 7c8fcbbde3
8 changed files with 20 additions and 18 deletions

View File

@@ -288,7 +288,7 @@ typedef struct Glyph {
int bitmap_top;
} Glyph;
static int glyph_cmp(void *key, const void *b)
static int glyph_cmp(const void *key, const void *b)
{
const Glyph *a = key, *bb = b;
int64_t diff = (int64_t)a->code - (int64_t)bb->code;