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-06-13 07:47:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-13 07:54:54 +0300
commitab382230471c6ee94e82d0fac3f5093e30710628 (patch)
tree9a07f5978a79a687fff983120018eb50f1092a51 /source/blender/makesrna
parentf731bce6cd42eda9c1ca5962b8d1ec99254c478f (diff)
Cleanup: redundant initialization
These were limited to obvious cases. Some less obvious cases were kept as refactoring might make them necessary in future.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c5
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index be7c938a525..2ccc8fe949c 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1912,10 +1912,9 @@ static void rna_Scene_transform_orientation_slots_begin(CollectionPropertyIterat
iter, orient_slot, sizeof(*orient_slot), ARRAY_SIZE(scene->orientation_slots), 0, NULL);
}
-static int rna_Scene_transform_orientation_slots_length(PointerRNA *ptr)
+static int rna_Scene_transform_orientation_slots_length(PointerRNA *UNUSED(ptr))
{
- Scene *scene = (Scene *)ptr->owner_id;
- return ARRAY_SIZE(scene->orientation_slots);
+ return ARRAY_SIZE(((Scene *)NULL)->orientation_slots);
}
static bool rna_Scene_use_audio_get(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 6005ec96255..4d45d1d6d63 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -1072,10 +1072,9 @@ static void rna_UserDef_studiolight_solid_lights_begin(CollectionPropertyIterato
rna_iterator_array_begin(iter, sl->light, sizeof(*sl->light), ARRAY_SIZE(sl->light), 0, NULL);
}
-static int rna_UserDef_studiolight_solid_lights_length(PointerRNA *ptr)
+static int rna_UserDef_studiolight_solid_lights_length(PointerRNA *UNUSED(ptr))
{
- StudioLight *sl = (StudioLight *)ptr->data;
- return ARRAY_SIZE(sl->light);
+ return ARRAY_SIZE(((StudioLight *)NULL)->light);
}
/* StudioLight.light_ambient */