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 22:14:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-29 22:14:20 +0400
commit7217927414407f8929a02c610fb06e61c0bff930 (patch)
treee1b473aa26d01cdf9f0f7597c8ac255be56362de /source/blender/nodes
parentf608b3c44402ef5c58217481d93e7fa83c9cd7cf (diff)
add inline functions for max/min ints, good to use when the arguments are function calls (we had a few of these).
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_defocus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.c b/source/blender/nodes/composite/nodes/node_composite_defocus.c
index 2ae3cd6ba56..d9ee067efe3 100644
--- a/source/blender/nodes/composite/nodes/node_composite_defocus.c
+++ b/source/blender/nodes/composite/nodes/node_composite_defocus.c
@@ -587,8 +587,8 @@ static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf,
// n-agonal
int ov, nv;
float mind, maxd, lwt;
- ys = MAX2((int)floor(bkh_b[2]*ct_crad + y), 0);
- ye = MIN2((int)ceil(bkh_b[3]*ct_crad + y), new->y - 1);
+ ys = maxi((int)floor(bkh_b[2] * ct_crad + y), 0);
+ ye = mini((int)ceil(bkh_b[3] * ct_crad + y), new->y - 1);
for (sy=ys; sy<=ye; sy++) {
float fxs = 1e10f, fxe = -1e10f;
float yf = (sy - y)/ct_crad;