code cleanup: use min/max functions rather then macros.
This commit is contained in:
@@ -4296,7 +4296,7 @@ static void finalize_render_object(Render *re, ObjectRen *obr, int timeoffset)
|
||||
|
||||
/* compute average bounding box of strandpoint itself (width) */
|
||||
if (obr->strandbuf->flag & R_STRAND_B_UNITS)
|
||||
obr->strandbuf->maxwidth= MAX2(obr->strandbuf->ma->strand_sta, obr->strandbuf->ma->strand_end);
|
||||
obr->strandbuf->maxwidth = max_ff(obr->strandbuf->ma->strand_sta, obr->strandbuf->ma->strand_end);
|
||||
else
|
||||
obr->strandbuf->maxwidth= 0.0f;
|
||||
|
||||
|
||||
@@ -2507,8 +2507,8 @@ int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env,
|
||||
|
||||
if (env->type == ENV_CUBE) {
|
||||
for (i = 0; i < 12; i += 2) {
|
||||
maxX = MAX2(maxX, layout[i] + 1);
|
||||
maxY = MAX2(maxY, layout[i + 1] + 1);
|
||||
maxX = max_ii(maxX, (int)layout[i] + 1);
|
||||
maxY = max_ii(maxY, (int)layout[i + 1] + 1);
|
||||
}
|
||||
|
||||
ibuf = IMB_allocImBuf(maxX * dx, maxY * dx, 24, IB_rectfloat);
|
||||
|
||||
@@ -637,7 +637,7 @@ static void shadowbuf_autoclip(Render *re, LampRen *lar)
|
||||
|
||||
maxtotvert= 0;
|
||||
for (obr=re->objecttable.first; obr; obr=obr->next)
|
||||
maxtotvert= MAX2(obr->totvert, maxtotvert);
|
||||
maxtotvert = max_ii(obr->totvert, maxtotvert);
|
||||
|
||||
clipflag= MEM_callocN(sizeof(char)*maxtotvert, "autoclipflag");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user