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-07-29 20:59:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-29 20:59:51 +0400
commitc41e1e434ab9defa35178ad8886d81b60d889e9a (patch)
tree89cc6a948b408865e475ccb1f8c2cf98edac76bc /source/blender/blenkernel/intern/colortools.c
parent93ff6f6dff73cf24e591dd2678ee601495714dc7 (diff)
code cleanup: replace MIN2/MAX2 with minf/maxf
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r--source/blender/blenkernel/intern/colortools.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 194b41f9aaa..20fae973756 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -66,10 +66,10 @@ CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, floa
cumap->flag = CUMA_DO_CLIP;
if (tot == 4) cumap->cur = 3; /* rhms, hack for 'col' curve? */
- clipminx = MIN2(minx, maxx);
- clipminy = MIN2(miny, maxy);
- clipmaxx = MAX2(minx, maxx);
- clipmaxy = MAX2(miny, maxy);
+ clipminx = minf(minx, maxx);
+ clipminy = minf(miny, maxy);
+ clipmaxx = maxf(minx, maxx);
+ clipmaxy = maxf(miny, maxy);
BLI_rctf_init(&cumap->curr, clipminx, clipmaxx, clipminy, clipmaxy);
cumap->clipr = cumap->curr;
@@ -463,8 +463,8 @@ static void curvemap_make_table(CurveMap *cuma, rctf *clipr)
bezt = MEM_callocN(cuma->totpoint * sizeof(BezTriple), "beztarr");
for (a = 0; a < cuma->totpoint; a++) {
- cuma->mintable = MIN2(cuma->mintable, cmp[a].x);
- cuma->maxtable = MAX2(cuma->maxtable, cmp[a].x);
+ cuma->mintable = minf(cuma->mintable, cmp[a].x);
+ cuma->maxtable = maxf(cuma->maxtable, cmp[a].x);
bezt[a].vec[1][0] = cmp[a].x;
bezt[a].vec[1][1] = cmp[a].y;
if (cmp[a].flag & CUMA_VECTOR)
@@ -655,13 +655,13 @@ void curvemapping_changed(CurveMapping *cumap, int rem_doubles)
for (a = 0; a < cuma->totpoint; a++) {
if (cmp[a].flag & CUMA_SELECT) {
if (cmp[a].x < clipr->xmin)
- dx = MIN2(dx, cmp[a].x - clipr->xmin);
+ dx = minf(dx, cmp[a].x - clipr->xmin);
else if (cmp[a].x > clipr->xmax)
- dx = MAX2(dx, cmp[a].x - clipr->xmax);
+ dx = maxf(dx, cmp[a].x - clipr->xmax);
if (cmp[a].y < clipr->ymin)
- dy = MIN2(dy, cmp[a].y - clipr->ymin);
+ dy = minf(dy, cmp[a].y - clipr->ymin);
else if (cmp[a].y > clipr->ymax)
- dy = MAX2(dy, cmp[a].y - clipr->ymax);
+ dy = maxf(dy, cmp[a].y - clipr->ymax);
}
}
for (a = 0; a < cuma->totpoint; a++) {