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>2012-11-07 16:31:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-07 16:31:05 +0400
commit34fecdd60e61506e6d9c2127945bccac250ee830 (patch)
tree53bd087b78e530247a470feda030e68b7c76ceee /source/blender/makesrna/intern/rna_pose.c
parent5850e62262fe7186c29f34df8243dc83556bb10b (diff)
code cleanup: use min/max functions rather then macros.
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r--source/blender/makesrna/intern/rna_pose.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index c29537378dd..412aad20a41 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -381,13 +381,7 @@ static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, in
bPose *pose = (ob) ? ob->pose : NULL;
*min = 0;
-
- if (pose) {
- *max = BLI_countlist(&pose->agroups) - 1;
- *max = MAX2(0, *max);
- }
- else
- *max = 0;
+ *max = pose ? max_ii(0, BLI_countlist(&pose->agroups) - 1) : 0;
}
static PointerRNA rna_Pose_active_bone_group_get(PointerRNA *ptr)
@@ -419,8 +413,7 @@ static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, in
bPose *pose = (bPose *)ptr->data;
*min = 0;
- *max = BLI_countlist(&pose->agroups) - 1;
- *max = MAX2(0, *max);
+ *max = max_ii(0, BLI_countlist(&pose->agroups) - 1);
}
#if 0