Correction to last commit
This commit is contained in:
parent
df1c400420
commit
d411e1548c
Notes:
blender-bot
2023-02-14 10:26:03 +01:00
Referenced by issue #40800, If Viewport shading is 'Rendered', B3D crashes after browsing to file for texture node and connecting to any shader node.
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue