[Bf-blender-cvs] [606805d1b78] master: Cleanup: use 'r_' prefix for return arguments, order last
Campbell Barton
noreply at git.blender.org
Fri Feb 5 12:34:56 CET 2021
Commit: 606805d1b78e32fe007452fd75b5d8522eb43a04
Author: Campbell Barton
Date: Fri Feb 5 22:34:03 2021 +1100
Branches: master
https://developer.blender.org/rB606805d1b78e32fe007452fd75b5d8522eb43a04
Cleanup: use 'r_' prefix for return arguments, order last
===================================================================
M source/blender/blenkernel/BKE_mask.h
M source/blender/blenkernel/BKE_node.h
M source/blender/blenkernel/intern/collection.c
M source/blender/blenkernel/intern/mask_evaluate.c
M source/blender/blenkernel/intern/mask_rasterize.c
M source/blender/blenkernel/intern/node.cc
M source/blender/blenloader/BLO_readfile.h
M source/blender/blenloader/intern/readblenentry.c
M source/blender/editors/gpencil/gpencil_convert.c
M source/blender/editors/mask/mask_draw.c
M source/blender/python/generic/py_capi_utils.c
M source/blender/python/generic/py_capi_utils.h
M source/blender/sequencer/SEQ_select.h
M source/blender/sequencer/intern/iterator.c
M source/blender/sequencer/intern/strip_select.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index 29072742f81..8e2f6e6f10c 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -269,18 +269,18 @@ int BKE_mask_spline_differentiate_calc_total(const struct MaskSpline *spline,
const unsigned int resol);
float (*BKE_mask_spline_differentiate_with_resolution(struct MaskSpline *spline,
- unsigned int *tot_diff_point,
- const unsigned int resol))[2];
+ const unsigned int resol,
+ unsigned int *r_tot_diff_point))[2];
void BKE_mask_spline_feather_collapse_inner_loops(struct MaskSpline *spline,
float (*feather_points)[2],
const unsigned int tot_feather_point);
float (*BKE_mask_spline_differentiate(
- struct MaskSpline *spline, int width, int height, unsigned int *tot_diff_point))[2];
+ struct MaskSpline *spline, int width, int height, unsigned int *r_tot_diff_point))[2];
float (*BKE_mask_spline_feather_differentiated_points_with_resolution(
struct 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];
/* *** mask point functions which involve evaluation *** */
float (*BKE_mask_spline_feather_points(struct MaskSpline *spline, int *tot_feather_point))[2];
@@ -289,7 +289,7 @@ float *BKE_mask_point_segment_diff(struct MaskSpline *spline,
struct MaskSplinePoint *point,
int width,
int height,
- unsigned int *tot_diff_point);
+ unsigned int *r_tot_diff_point);
float *BKE_mask_point_segment_feather_diff(struct MaskSpline *spline,
struct MaskSplinePoint *point,
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index dcfd6ca7bdd..9ee21c6e825 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -453,7 +453,9 @@ void ntreeUpdateTree(struct Main *main, struct bNodeTree *ntree);
void ntreeUpdateAllNew(struct Main *main);
void ntreeUpdateAllUsers(struct Main *main, struct ID *id);
-void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes);
+void ntreeGetDependencyList(struct bNodeTree *ntree,
+ struct bNode ***r_deplist,
+ int *r_deplist_len);
/* XXX old trees handle output flags automatically based on special output
* node types and last active selection.
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 601ee57fc89..dd0572f9b12 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -1909,7 +1909,7 @@ bool BKE_collection_move(Main *bmain,
/** \name Iterators
* \{ */
-/* scene collection iteractor */
+/* Scene collection iterator. */
typedef struct CollectionsIteratorData {
Scene *scene;
@@ -1941,10 +1941,12 @@ static void scene_collections_build_array(Collection *collection, void *data)
(*array)++;
}
-static void scene_collections_array(Scene *scene, Collection ***collections_array, int *tot)
+static void scene_collections_array(Scene *scene,
+ Collection ***r_collections_array,
+ int *r_collections_array_len)
{
- *collections_array = NULL;
- *tot = 0;
+ *r_collections_array = NULL;
+ *r_collections_array_len = 0;
if (scene == NULL) {
return;
@@ -1952,14 +1954,15 @@ static void scene_collections_array(Scene *scene, Collection ***collections_arra
Collection *collection = scene->master_collection;
BLI_assert(collection != NULL);
- scene_collection_callback(collection, scene_collections_count, tot);
+ scene_collection_callback(collection, scene_collections_count, r_collections_array_len);
- if (*tot == 0) {
+ if (*r_collections_array_len == 0) {
return;
}
- Collection **array = MEM_mallocN(sizeof(Collection *) * (*tot), "CollectionArray");
- *collections_array = array;
+ Collection **array = MEM_mallocN(sizeof(Collection *) * (*r_collections_array_len),
+ "CollectionArray");
+ *r_collections_array = array;
scene_collection_callback(collection, scene_collections_build_array, &array);
}
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(MaskS
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list