From 72d2355af525664671ed6089b31d5bbe126cd865 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 8 Jun 2021 00:11:05 +1000 Subject: Cleanup: remove redundant cast, use const casts --- source/blender/bmesh/operators/bmo_connect_pair.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/bmesh/operators') diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c b/source/blender/bmesh/operators/bmo_connect_pair.c index 1c861df0150..8a0673c9b33 100644 --- a/source/blender/bmesh/operators/bmo_connect_pair.c +++ b/source/blender/bmesh/operators/bmo_connect_pair.c @@ -180,8 +180,8 @@ static void min_dist_dir_update(MinDistDir *dist, const float dist_dir[3]) static int state_isect_co_pair(const PathContext *pc, const float co_a[3], const float co_b[3]) { - const float diff_a = dot_m3_v3_row_x((float(*)[3])pc->matrix, co_a) - pc->axis_sep; - const float diff_b = dot_m3_v3_row_x((float(*)[3])pc->matrix, co_b) - pc->axis_sep; + const float diff_a = dot_m3_v3_row_x(pc->matrix, co_a) - pc->axis_sep; + const float diff_b = dot_m3_v3_row_x(pc->matrix, co_b) - pc->axis_sep; const int test_a = (fabsf(diff_a) < CONNECT_EPS) ? 0 : (diff_a < 0.0f) ? -1 : 1; const int test_b = (fabsf(diff_b) < CONNECT_EPS) ? 0 : (diff_b < 0.0f) ? -1 : 1; @@ -194,7 +194,7 @@ static int state_isect_co_pair(const PathContext *pc, const float co_a[3], const static int state_isect_co_exact(const PathContext *pc, const float co[3]) { - const float diff = dot_m3_v3_row_x((float(*)[3])pc->matrix, co) - pc->axis_sep; + const float diff = dot_m3_v3_row_x(pc->matrix, co) - pc->axis_sep; return (fabsf(diff) <= CONNECT_EPS); } @@ -204,8 +204,8 @@ static float state_calc_co_pair_fac(const PathContext *pc, { float diff_a, diff_b, diff_tot; - diff_a = fabsf(dot_m3_v3_row_x((float(*)[3])pc->matrix, co_a) - pc->axis_sep); - diff_b = fabsf(dot_m3_v3_row_x((float(*)[3])pc->matrix, co_b) - pc->axis_sep); + diff_a = fabsf(dot_m3_v3_row_x(pc->matrix, co_a) - pc->axis_sep); + diff_b = fabsf(dot_m3_v3_row_x(pc->matrix, co_b) - pc->axis_sep); diff_tot = (diff_a + diff_b); return (diff_tot > FLT_EPSILON) ? (diff_a / diff_tot) : 0.5f; } -- cgit v1.2.3