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:
authorHans Goudey <h.goudey@me.com>2021-01-26 02:22:52 +0300
committerHans Goudey <h.goudey@me.com>2021-01-26 02:22:52 +0300
commitae1e68f5146deff825c390fd180d1d45f33cb162 (patch)
treeec0546ad369f2f8c418a39a03e14cff5565c8ddd /source/blender/blenkernel/intern/collection.c
parent70e064f1118d18e1671f16cd2789f8cb7b8fd1e1 (diff)
Cleanup: Declare variables where initialized
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r--source/blender/blenkernel/intern/collection.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 4e29ca80d30..601ee57fc89 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -1943,9 +1943,6 @@ static void scene_collections_build_array(Collection *collection, void *data)
static void scene_collections_array(Scene *scene, Collection ***collections_array, int *tot)
{
- Collection *collection;
- Collection **array;
-
*collections_array = NULL;
*tot = 0;
@@ -1953,7 +1950,7 @@ static void scene_collections_array(Scene *scene, Collection ***collections_arra
return;
}
- collection = scene->master_collection;
+ Collection *collection = scene->master_collection;
BLI_assert(collection != NULL);
scene_collection_callback(collection, scene_collections_count, tot);
@@ -1961,7 +1958,8 @@ static void scene_collections_array(Scene *scene, Collection ***collections_arra
return;
}
- *collections_array = array = MEM_mallocN(sizeof(Collection *) * (*tot), "CollectionArray");
+ Collection **array = MEM_mallocN(sizeof(Collection *) * (*tot), "CollectionArray");
+ *collections_array = array;
scene_collection_callback(collection, scene_collections_build_array, &array);
}