Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-02-05 14:34:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-05 14:34:03 +0300
commit606805d1b78e32fe007452fd75b5d8522eb43a04 (patch)
tree2394adb4c0743d014d7e3e78369f91b074a8ed29 /source/blender/blenkernel/intern/mask_evaluate.c
parentf8cbd333d653022d3a3340d0249dd957f02e31e5 (diff)
Cleanup: use 'r_' prefix for return arguments, order last
Diffstat (limited to 'source/blender/blenkernel/intern/mask_evaluate.c')
-rw-r--r--source/blender/blenkernel/intern/mask_evaluate.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/blenkernel/intern/mask_evaluate.c b/source/blender/blenkernel/intern/mask_evaluate.c
index 595fd0c9550..a42836b5399 100644
--- a/source/blender/blenkernel/intern/mask_evaluate.c
+++ b/source/blender/blenkernel/intern/mask_evaluate.c
@@ -128,8 +128,8 @@ int BKE_mask_spline_differentiate_calc_total(const MaskSpline *spline, const uns
}
float (*BKE_mask_spline_differentiate_with_resolution(MaskSpline *spline,
- unsigned int *tot_diff_point,
- const unsigned int resol))[2]
+ const unsigned int resol,
+ unsigned int *r_tot_diff_point))[2]
{
MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline);
@@ -140,12 +140,12 @@ float (*BKE_mask_spline_differentiate_with_resolution(MaskSpline *spline,
if (spline->tot_point <= 1) {
/* nothing to differentiate */
- *tot_diff_point = 0;
+ *r_tot_diff_point = 0;
return NULL;
}
/* len+1 because of 'forward_diff_bezier' function */
- *tot_diff_point = tot;
+ *r_tot_diff_point = tot;
diff_points = fp = MEM_mallocN((tot + 1) * sizeof(*diff_points), "mask spline vets");
a = spline->tot_point - 1;
@@ -192,11 +192,11 @@ float (*BKE_mask_spline_differentiate_with_resolution(MaskSpline *spline,
}
float (*BKE_mask_spline_differentiate(
- MaskSpline *spline, int width, int height, unsigned int *tot_diff_point))[2]
+ MaskSpline *spline, int width, int height, unsigned int *r_tot_diff_point))[2]
{
uint resol = BKE_mask_spline_resolution(spline, width, height);
- return BKE_mask_spline_differentiate_with_resolution(spline, tot_diff_point, resol);
+ return BKE_mask_spline_differentiate_with_resolution(spline, resol, r_tot_diff_point);
}
/* ** feather points self-intersection collapse routine ** */
@@ -507,9 +507,9 @@ void BKE_mask_spline_feather_collapse_inner_loops(MaskSpline *spline,
/** 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]
+ const bool do_feather_isect,
+ unsigned int *r_tot_feather_point))[2]
{
MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline);
MaskSplinePoint *point_curr, *point_prev;
@@ -569,7 +569,7 @@ static float (*mask_spline_feather_differentiated_points_with_resolution__even(
point_curr++;
}
- *tot_feather_point = tot;
+ *r_tot_feather_point = tot;
if ((spline->flag & MASK_SPLINE_NOINTERSECT) && do_feather_isect) {
BKE_mask_spline_feather_collapse_inner_loops(spline, feather, tot);
@@ -581,9 +581,9 @@ static float (*mask_spline_feather_differentiated_points_with_resolution__even(
/** 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]
+ const bool do_feather_isect,
+ unsigned int *r_tot_feather_point))[2]
{
MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline);
@@ -594,12 +594,12 @@ static float (*mask_spline_feather_differentiated_points_with_resolution__double
if (spline->tot_point <= 1) {
/* nothing to differentiate */
- *tot_feather_point = 0;
+ *r_tot_feather_point = 0;
return NULL;
}
/* len+1 because of 'forward_diff_bezier' function */
- *tot_feather_point = tot;
+ *r_tot_feather_point = tot;
feather = fp = MEM_mallocN((tot + 1) * sizeof(*feather), "mask spline vets");
a = spline->tot_point - 1;
@@ -724,24 +724,24 @@ 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,
+ const unsigned int resol,
+ const bool do_feather_isect,
+ unsigned int *r_tot_feather_point))[2]
{
switch (spline->offset_mode) {
case MASK_SPLINE_OFFSET_EVEN:
return mask_spline_feather_differentiated_points_with_resolution__even(
- spline, tot_feather_point, resol, do_feather_isect);
+ spline, resol, do_feather_isect, r_tot_feather_point);
case MASK_SPLINE_OFFSET_SMOOTH:
default:
return mask_spline_feather_differentiated_points_with_resolution__double(
- spline, tot_feather_point, resol, do_feather_isect);
+ spline, resol, do_feather_isect, r_tot_feather_point);
}
}
-float (*BKE_mask_spline_feather_points(MaskSpline *spline, int *tot_feather_point))[2]
+float (*BKE_mask_spline_feather_points(MaskSpline *spline, int *r_tot_feather_point))[2]
{
MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline);
@@ -783,7 +783,7 @@ float (*BKE_mask_spline_feather_points(MaskSpline *spline, int *tot_feather_poin
}
}
- *tot_feather_point = tot;
+ *r_tot_feather_point = tot;
return feather;
}
@@ -793,7 +793,7 @@ float *BKE_mask_point_segment_feather_diff(MaskSpline *spline,
MaskSplinePoint *point,
int width,
int height,
- unsigned int *tot_feather_point)
+ unsigned int *r_tot_feather_point)
{
float *feather, *fp;
unsigned int resol = BKE_mask_spline_feather_resolution(spline, width, height);
@@ -812,7 +812,7 @@ float *BKE_mask_point_segment_feather_diff(MaskSpline *spline,
fp[1] = co[1] + n[1] * weight;
}
- *tot_feather_point = resol;
+ *r_tot_feather_point = resol;
return feather;
}
@@ -821,7 +821,7 @@ float *BKE_mask_point_segment_diff(MaskSpline *spline,
MaskSplinePoint *point,
int width,
int height,
- unsigned int *tot_diff_point)
+ unsigned int *r_tot_diff_point)
{
MaskSplinePoint *points_array = BKE_mask_spline_point_array_from_point(spline, point);
@@ -837,7 +837,7 @@ float *BKE_mask_point_segment_diff(MaskSpline *spline,
}
/* resol+1 because of 'forward_diff_bezier' function */
- *tot_diff_point = resol + 1;
+ *r_tot_diff_point = resol + 1;
diff_points = fp = MEM_callocN(sizeof(float[2]) * (resol + 1), "mask segment vets");
for (j = 0; j < 2; j++) {