diff options
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index c51a192b109..569fe1c326d 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -3402,8 +3402,8 @@ static void p_chart_stretch_minimize(PChart *chart, RNG *rng) static int p_compare_geometric_uv(const void *a, const void *b) { - const PVert *v1 = *(const PVert **)a; - const PVert *v2 = *(const PVert **)b; + const PVert *v1 = *(const PVert * const *)a; + const PVert *v2 = *(const PVert * const *)b; if (v1->uv[0] < v2->uv[0]) return -1; @@ -3788,11 +3788,14 @@ static PBool p_node_intersect(SmoothNode *node, float co[2]) /* smoothing */ -static int p_compare_float(const void *a, const void *b) +static int p_compare_float(const void *a_, const void *b_) { - if (*((float *)a) < *((float *)b)) + const float a = *(const float *)a_; + const float b = *(const float *)b_; + + if (a < b) return -1; - else if (*((float *)a) == *((float *)b)) + else if (a == b) return 0; else return 1; |