diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-30 23:57:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-30 23:57:01 +0400 |
commit | 3d5ab5a4960241adea9ccc4fb2f8d2e4ba89c639 (patch) | |
tree | 5ea5524004f11e5573616c7e76fc5bfb9faa97b6 /source/blender/blenkernel/intern/action.c | |
parent | 762a988130379f78297f5a5b026c78be2c774ea6 (diff) |
Warning cleanup: signed/unsigned compare
also remove redundant loop in BKE_pose_copy_data
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index d02961430c4..c6fd3c30657 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -588,14 +588,6 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints) outPose = MEM_callocN(sizeof(bPose), "pose"); BLI_duplicatelist(&outPose->chanbase, &src->chanbase); - if (outPose->chanbase.first) { - bPoseChannel *pchan; - for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) { - if (pchan->custom) { - id_us_plus(&pchan->custom->id); - } - } - } outPose->iksolver = src->iksolver; outPose->ikdata = NULL; @@ -603,6 +595,11 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints) outPose->avs = src->avs; for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) { + + if (pchan->custom) { + id_us_plus(&pchan->custom->id); + } + if (copy_constraints) { BKE_constraints_copy(&listb, &pchan->constraints, true); // BKE_constraints_copy NULLs listb pchan->constraints = listb; |