diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-09 19:41:07 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-09 19:41:07 +0300 |
commit | 63916f5941b443dfc8566682bb75374e5abd553f (patch) | |
tree | fb0704701f1d4d9acbddf4a6fbc62c819d8d4c36 /source/blender/editors/armature/pose_group.c | |
parent | 0cff2c944f9c2cd3ac873fe826c4399fc2f32159 (diff) |
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/editors/armature/pose_group.c')
-rw-r--r-- | source/blender/editors/armature/pose_group.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c index cb7c68178d9..ffa28bf9e36 100644 --- a/source/blender/editors/armature/pose_group.c +++ b/source/blender/editors/armature/pose_group.c @@ -381,8 +381,6 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op)) bPoseChannel *pchan; tSortActionGroup *agrp_array; bActionGroup *agrp; - int agrp_count; - int i; if (ELEM(NULL, ob, pose)) { return OPERATOR_CANCELLED; @@ -392,8 +390,9 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op)) } /* create temporary array with bone groups and indices */ - agrp_count = BLI_listbase_count(&pose->agroups); + int agrp_count = BLI_listbase_count(&pose->agroups); agrp_array = MEM_mallocN(sizeof(tSortActionGroup) * agrp_count, "sort bone groups"); + int i; for (agrp = pose->agroups.first, i = 0; agrp; agrp = agrp->next, i++) { BLI_assert(i < agrp_count); agrp_array[i].agrp = agrp; |