diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-07 16:31:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-07 16:31:05 +0400 |
commit | 34fecdd60e61506e6d9c2127945bccac250ee830 (patch) | |
tree | 53bd087b78e530247a470feda030e68b7c76ceee /source/blender/makesrna/intern/rna_object_force.c | |
parent | 5850e62262fe7186c29f34df8243dc83556bb10b (diff) |
code cleanup: use min/max functions rather then macros.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index f47b864d25a..6d7187da7d9 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -51,6 +51,9 @@ static EnumPropertyItem effector_shape_items[] = { #ifdef RNA_RUNTIME +#include "BLI_math_base.h" + + /* type specific return values only used from functions */ static EnumPropertyItem curve_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, @@ -239,8 +242,7 @@ static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, for (pid = pidlist.first; pid; pid = pid->next) { if (pid->cache == cache) { - *max = BLI_countlist(pid->ptcaches) - 1; - *max = MAX2(0, *max); + *max = max_ii(0, BLI_countlist(pid->ptcaches) - 1); break; } } |