Commit: 3d5ab5a4960241adea9ccc4fb2f8d2e4ba89c639
Author: Campbell Barton
Date:   Thu May 1 05:57:01 2014 +1000
https://developer.blender.org/rB3d5ab5a4960241adea9ccc4fb2f8d2e4ba89c639

Warning cleanup: signed/unsigned compare

also remove redundant loop in BKE_pose_copy_data

===================================================================

M       source/blender/blenkernel/intern/action.c
M       source/blender/editors/interface/interface_layout.c

===================================================================

diff --git a/source/blender/blenkernel/intern/action.c 
b/source/blender/blenkernel/intern/action.c
index d029614..c6fd3c3 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;
diff --git a/source/blender/editors/interface/interface_layout.c 
b/source/blender/editors/interface/interface_layout.c
index 942ffec..0b09e3b 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -410,8 +410,8 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, 
const char *name, in
                        uiBlockBeginAlign(block);
 
                        for (a = 0; a < colbuts; a++) {
-                               int layer_num  = a + b * colbuts;
-                               int layer_flag = 1 << layer_num;
+                               const int layer_num  = a + b * colbuts;
+                               const unsigned int layer_flag = (1u << 
layer_num);
                                
                                if (layer_used & layer_flag) {
                                        if (layer_active & layer_flag)
@@ -428,8 +428,8 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, 
const char *name, in
                                        uiButSetFunc(but, ui_layer_but_cb, but, 
SET_INT_IN_POINTER(layer_num));
                        }
                        for (a = 0; a < colbuts; a++) {
-                               int layer_num  = a + len / 2 + b * colbuts;
-                               int layer_flag = 1 << layer_num;
+                               const int layer_num  = a + len / 2 + b * 
colbuts;
+                               const unsigned int layer_flag = (1u << 
layer_num);
                                
                                if (layer_used & layer_flag) {
                                        if (layer_active & layer_flag)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to