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-23 20:21:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-23 20:21:55 +0400
commitfec81d9b56075f46f6dde196ac85140872cff74e (patch)
tree6ee12fcc0b04ba3041f1b7e4d17281136375beb1 /source/blender/editors/render
parentc623ba5e4b2aa68a5717ba17500c14217bc417aa (diff)
use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_preview.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 5cfe7179f5a..a2f31b35246 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -368,7 +368,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
if (OB_TYPE_SUPPORT_MATERIAL(base->object->type)) {
/* don't use assign_material, it changed mat->id.us, which shows in the UI */
Material ***matar = give_matarar(base->object);
- int actcol = MAX2(base->object->actcol - 1, 0);
+ int actcol = max_ii(base->object->actcol - 1, 0);
if (matar && actcol < base->object->totcol)
(*matar)[actcol] = mat;
@@ -518,8 +518,8 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
if (ABS(rres.rectx - newx) < 2 && ABS(rres.recty - newy) < 2) {
- newrect->xmax = MAX2(newrect->xmax, rect->xmin + rres.rectx + offx);
- newrect->ymax = MAX2(newrect->ymax, rect->ymin + rres.recty);
+ newrect->xmax = max_ii(newrect->xmax, rect->xmin + rres.rectx + offx);
+ newrect->ymax = max_ii(newrect->ymax, rect->ymin + rres.recty);
if (rres.rectx && rres.recty) {
/* temporary conversion to byte for drawing */