From 9fc95bd7ee2aed9d4de7c3c05dfef6597b83a332 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 27 Oct 2012 11:18:54 +0000 Subject: use min/max inline functions where MIN2/MAX2 were doing type conversion. --- source/blender/editors/space_action/action_edit.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_action') diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 0e2c6fbe3ce..ae78b71f2ad 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -254,8 +254,9 @@ static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const /* find gp-frame which is less than or equal to cframe */ for (gpf = gpl->frames.first; gpf; gpf = gpf->next) { - *min = MIN2(*min, gpf->framenum); - *max = MAX2(*max, gpf->framenum); + const float framenum = (float)gpf->framenum; + *min = min_ff(*min, framenum); + *max = max_ff(*max, framenum); } } else if (ale->datatype == ALE_MASKLAY) { @@ -267,8 +268,9 @@ static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const masklay_shape; masklay_shape = masklay_shape->next) { - *min = MIN2(*min, masklay_shape->frame); - *max = MAX2(*max, masklay_shape->frame); + const float framenum = (float)masklay_shape->frame; + *min = min_ff(*min, framenum); + *max = max_ff(*max, framenum); } } else { @@ -284,8 +286,8 @@ static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const } /* try to set cur using these values, if they're more extreme than previously set values */ - *min = MIN2(*min, tmin); - *max = MAX2(*max, tmax); + *min = min_ff(*min, tmin); + *max = max_ff(*max, tmax); } } -- cgit v1.2.3