diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-24 22:22:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-24 22:22:14 +0400 |
commit | d411e1548cfda7a48e4df81eda1e998ae172ed43 (patch) | |
tree | 91009c3f521ac29e82e67a0335e2f2b7b2f0e30f | |
parent | df1c400420b39506e38745bb0db3d4f9797de424 (diff) |
Correction to last commit
-rw-r--r-- | source/blender/blenkernel/intern/navmesh_conversion.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_sort.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/sort.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c index 8ab9cdd41e7..6c3f4d545d3 100644 --- a/source/blender/blenkernel/intern/navmesh_conversion.c +++ b/source/blender/blenkernel/intern/navmesh_conversion.c @@ -341,7 +341,7 @@ int buildNavMeshData(const int nverts, const float *verts, trisMapping[i] = i; context.recastData = recastData; context.trisToFacesMap = trisToFacesMap; - BLI_qsort_r(trisMapping, ntris, sizeof(int), &context, compareByData); + BLI_qsort_r(trisMapping, ntris, sizeof(int), compareByData, &context); /* search first valid triangle - triangle of convex polygon */ validTriStart = -1; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 1cc89d5f3fa..221bc2689bb 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1344,7 +1344,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D } if (orig_index) { - BLI_qsort_r(particle_element, totpart, sizeof(int), orig_index, distribute_compare_orig_index); + BLI_qsort_r(particle_element, totpart, sizeof(int), distribute_compare_orig_index, orig_index); } } diff --git a/source/blender/blenlib/BLI_sort.h b/source/blender/blenlib/BLI_sort.h index 0108ae19872..516f917a351 100644 --- a/source/blender/blenlib/BLI_sort.h +++ b/source/blender/blenlib/BLI_sort.h @@ -42,7 +42,7 @@ /* Quick sort reentrant */ typedef int (*BLI_sort_cmp_t)(const void *a, const void *b, void *ctx); -void BLI_qsort_r(void *a, size_t n, size_t es, void *thunk, BLI_sort_cmp_t cmp) +void BLI_qsort_r(void *a, size_t n, size_t es, BLI_sort_cmp_t cmp, void *thunk) #ifdef __GNUC__ __attribute__((nonnull(1, 5))) #endif diff --git a/source/blender/blenlib/intern/sort.c b/source/blender/blenlib/intern/sort.c index 991337446cf..9fad7505f79 100644 --- a/source/blender/blenlib/intern/sort.c +++ b/source/blender/blenlib/intern/sort.c @@ -89,7 +89,7 @@ BLI_INLINE char *med3(char *a, char *b, char *c, BLI_sort_cmp_t cmp, void *thunk * * \note Follows BSD arg order (incompatible with glibc). */ -void BLI_qsort_r(void *a, size_t n, size_t es, void *thunk, BLI_sort_cmp_t cmp) +void BLI_qsort_r(void *a, size_t n, size_t es, BLI_sort_cmp_t cmp, void *thunk) { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; int d, r, swaptype, swap_cnt; @@ -166,7 +166,7 @@ loop: r = min(pd - pc, pn - pd - es); vecswap(pb, pn - r, r); if ((r = pb - pa) > es) - BLI_qsort_r(a, r / es, es, thunk, cmp); + BLI_qsort_r(a, r / es, es, cmp, thunk); if ((r = pd - pc) > es) { /* Iterate rather than recurse to save stack space */ a = pn - r; |