diff options
author | Dalai Felinto <dalai@blender.org> | 2020-04-03 20:15:01 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2020-04-03 20:27:46 +0300 |
commit | d138cbfb47e379edc1ee915a8c6ff65b01f000d6 (patch) | |
tree | f4773ecce897c32eaf75295dd5f6a8e730d471ed /source/blender/editors/armature/pose_transform.c | |
parent | b0c1184875d39abac4a65a5d20e263ea6d841009 (diff) |
Code Quality: Replace for loops with LISTBASE_FOREACH
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
Diffstat (limited to 'source/blender/editors/armature/pose_transform.c')
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 3be5e033e00..31c89ca9f43 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -333,7 +333,7 @@ static void applyarmature_process_selected_recursive(bArmature *arm, pstate = &new_pstate; } - for (Bone *child = bone->childbase.first; child; child = child->next) { + LISTBASE_FOREACH (Bone *, child, &bone->childbase) { applyarmature_process_selected_recursive(arm, pose, pose_eval, child, selected, pstate); } } @@ -389,7 +389,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) if (use_selected) { /* The selected only mode requires a recursive walk to handle parent-child relations. */ - for (Bone *bone = arm->bonebase.first; bone; bone = bone->next) { + LISTBASE_FOREACH (Bone *, bone, &arm->bonebase) { applyarmature_process_selected_recursive( arm, pose, ob_eval->pose, bone, &selected_bones, NULL); } |