[Bf-blender-cvs] [d411e15] master: Correction to last commit

Campbell Barton noreply at git.blender.org
Tue Jun 24 20:22:49 CEST 2014


Commit: d411e1548cfda7a48e4df81eda1e998ae172ed43
Author: Campbell Barton
Date:   Wed Jun 25 04:22:14 2014 +1000
https://developer.blender.org/rBd411e1548cfda7a48e4df81eda1e998ae172ed43

Correction to last commit

===================================================================

M	source/blender/blenkernel/intern/navmesh_conversion.c
M	source/blender/blenkernel/intern/particle_system.c
M	source/blender/blenlib/BLI_sort.h
M	source/blender/blenlib/intern/sort.c

===================================================================

diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c
index 8ab9cdd..6c3f4d5 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 1cc89d5..221bc26 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 0108ae1..516f917 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 9913374..9fad750 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;




More information about the Bf-blender-cvs mailing list