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/collection.c
parentf8cbd333d653022d3a3340d0249dd957f02e31e5 (diff)
Cleanup: use 'r_' prefix for return arguments, order last
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r--source/blender/blenkernel/intern/collection.c19
1 files changed, 11 insertions, 8 deletions
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);
}