diff options
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/listbase.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/scanfill_utils.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c index abf15d57cf7..d9cf8971246 100644 --- a/source/blender/blenlib/intern/listbase.c +++ b/source/blender/blenlib/intern/listbase.c @@ -173,7 +173,7 @@ void BLI_freelinkN(ListBase *listbase, void *vlink) * (which should return 1 iff its first arg should come after its second arg). * This uses insertion sort, so NOT ok for large list. */ -void BLI_sortlist(ListBase *listbase, int (*cmp)(void *, void *)) +void BLI_sortlist(ListBase *listbase, int (*cmp)(const void *, const void *)) { Link *current = NULL; Link *previous = NULL; @@ -195,7 +195,7 @@ void BLI_sortlist(ListBase *listbase, int (*cmp)(void *, void *)) } } -void BLI_sortlist_r(ListBase *listbase, void *thunk, int (*cmp)(void *, void *, void *)) +void BLI_sortlist_r(ListBase *listbase, void *thunk, int (*cmp)(void *, const void *, const void *)) { Link *current = NULL; Link *previous = NULL; diff --git a/source/blender/blenlib/intern/scanfill_utils.c b/source/blender/blenlib/intern/scanfill_utils.c index 828cb3a580b..9fc1db1f1e4 100644 --- a/source/blender/blenlib/intern/scanfill_utils.c +++ b/source/blender/blenlib/intern/scanfill_utils.c @@ -132,12 +132,12 @@ static ListBase *edge_isect_ls_add(GHash *isect_hash, ScanFillEdge *eed, ScanFil return e_ls; } -static int edge_isect_ls_sort_cb(void *thunk, void *def_a_ptr, void *def_b_ptr) +static int edge_isect_ls_sort_cb(void *thunk, const void *def_a_ptr, const void *def_b_ptr) { const float *co = thunk; - ScanFillIsect *i_a = (ScanFillIsect *)(((LinkData *)def_a_ptr)->data); - ScanFillIsect *i_b = (ScanFillIsect *)(((LinkData *)def_b_ptr)->data); + const ScanFillIsect *i_a = ((LinkData *)def_a_ptr)->data; + const ScanFillIsect *i_b = ((LinkData *)def_b_ptr)->data; const float a = len_squared_v2v2(co, i_a->co); const float b = len_squared_v2v2(co, i_b->co); |