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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user