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-10-27 15:18:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-27 15:18:54 +0400
commit9fc95bd7ee2aed9d4de7c3c05dfef6597b83a332 (patch)
treea93569a6068e176cd68d859e880a3124da37d7dd /source/blender/editors/space_action
parentec67334e25b92c60f97978ef1bf754b4ba55127e (diff)
use min/max inline functions where MIN2/MAX2 were doing type conversion.
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_edit.c14
1 files changed, 8 insertions, 6 deletions
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);
}
}