From 2097e621edcf7658895b9f6ba9cc4e51f5538369 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Mar 2014 03:24:05 +1100 Subject: Code cleanup: use r_ prefix for return args --- source/blender/blenkernel/intern/mask_evaluate.c | 47 +++++++++++------------- 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'source/blender/blenkernel/intern/mask_evaluate.c') diff --git a/source/blender/blenkernel/intern/mask_evaluate.c b/source/blender/blenkernel/intern/mask_evaluate.c index c6cc4a412b8..4d9791a077c 100644 --- a/source/blender/blenkernel/intern/mask_evaluate.c +++ b/source/blender/blenkernel/intern/mask_evaluate.c @@ -252,8 +252,9 @@ static void feather_bucket_add_edge(FeatherEdgesBucket *bucket, int start, int e bucket->tot_segment++; } -static void feather_bucket_check_intersect(float (*feather_points)[2], int tot_feather_point, FeatherEdgesBucket *bucket, - int cur_a, int cur_b) +static void feather_bucket_check_intersect( + float (*feather_points)[2], int tot_feather_point, FeatherEdgesBucket *bucket, + int cur_a, int cur_b) { int i; @@ -313,8 +314,9 @@ static void feather_bucket_check_intersect(float (*feather_points)[2], int tot_f } } -static int feather_bucket_index_from_coord(const float co[2], const float min[2], const float bucket_scale[2], - const int buckets_per_side) +static int feather_bucket_index_from_coord( + const float co[2], const float min[2], const float bucket_scale[2], + const int buckets_per_side) { int x = (int) ((co[0] - min[0]) * bucket_scale[0]); int y = (int) ((co[1] - min[1]) * bucket_scale[1]); @@ -328,9 +330,9 @@ static int feather_bucket_index_from_coord(const float co[2], const float min[2] return y * buckets_per_side + x; } -static void feather_bucket_get_diagonal(FeatherEdgesBucket *buckets, int start_bucket_index, int end_bucket_index, - int buckets_per_side, FeatherEdgesBucket **diagonal_bucket_a_r, - FeatherEdgesBucket **diagonal_bucket_b_r) +static void feather_bucket_get_diagonal( + FeatherEdgesBucket *buckets, int start_bucket_index, int end_bucket_index, int buckets_per_side, + FeatherEdgesBucket **r_diagonal_bucket_a, FeatherEdgesBucket **r_diagonal_bucket_b) { int start_bucket_x = start_bucket_index % buckets_per_side; int start_bucket_y = start_bucket_index / buckets_per_side; @@ -341,11 +343,12 @@ static void feather_bucket_get_diagonal(FeatherEdgesBucket *buckets, int start_b int diagonal_bucket_a_index = start_bucket_y * buckets_per_side + end_bucket_x; int diagonal_bucket_b_index = end_bucket_y * buckets_per_side + start_bucket_x; - *diagonal_bucket_a_r = &buckets[diagonal_bucket_a_index]; - *diagonal_bucket_b_r = &buckets[diagonal_bucket_b_index]; + *r_diagonal_bucket_a = &buckets[diagonal_bucket_a_index]; + *r_diagonal_bucket_b = &buckets[diagonal_bucket_b_index]; } -void BKE_mask_spline_feather_collapse_inner_loops(MaskSpline *spline, float (*feather_points)[2], const unsigned int tot_feather_point) +void BKE_mask_spline_feather_collapse_inner_loops( + MaskSpline *spline, float (*feather_points)[2], const unsigned int tot_feather_point) { #define BUCKET_INDEX(co) \ feather_bucket_index_from_coord(co, min, bucket_scale, buckets_per_side) @@ -502,11 +505,9 @@ void BKE_mask_spline_feather_collapse_inner_loops(MaskSpline *spline, float (*fe } /** only called from #BKE_mask_spline_feather_differentiated_points_with_resolution() ! */ -static float (*mask_spline_feather_differentiated_points_with_resolution__even(MaskSpline *spline, - unsigned int *tot_feather_point, - const unsigned int resol, - const bool do_feather_isect - ))[2] +static float (*mask_spline_feather_differentiated_points_with_resolution__even( + MaskSpline *spline, unsigned int *tot_feather_point, + const unsigned int resol, const bool do_feather_isect))[2] { MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline); MaskSplinePoint *point_curr, *point_prev; @@ -575,11 +576,9 @@ static float (*mask_spline_feather_differentiated_points_with_resolution__even(M } /** only called from #BKE_mask_spline_feather_differentiated_points_with_resolution() ! */ -static float (*mask_spline_feather_differentiated_points_with_resolution__double(MaskSpline *spline, - unsigned int *tot_feather_point, - const unsigned int resol, - const bool do_feather_isect - ))[2] +static float (*mask_spline_feather_differentiated_points_with_resolution__double( + MaskSpline *spline, unsigned int *tot_feather_point, + const unsigned int resol, const bool do_feather_isect))[2] { MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline); @@ -712,11 +711,9 @@ static float (*mask_spline_feather_differentiated_points_with_resolution__double * values align with #BKE_mask_spline_differentiate_with_resolution * when \a resol arguments match. */ -float (*BKE_mask_spline_feather_differentiated_points_with_resolution(MaskSpline *spline, - unsigned int *tot_feather_point, - const unsigned int resol, - const bool do_feather_isect - ))[2] +float (*BKE_mask_spline_feather_differentiated_points_with_resolution( + MaskSpline *spline, unsigned int *tot_feather_point, + const unsigned int resol, const bool do_feather_isect))[2] { switch (spline->offset_mode) { case MASK_SPLINE_OFFSET_EVEN: -- cgit v1.2.3