diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-29 22:14:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-29 22:14:20 +0400 |
commit | 7217927414407f8929a02c610fb06e61c0bff930 (patch) | |
tree | e1b473aa26d01cdf9f0f7597c8ac255be56362de /source/blender/editors/screen | |
parent | f608b3c44402ef5c58217481d93e7fa83c9cd7cf (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/editors/screen')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 0f1ffb856e7..5296c8615ab 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -624,8 +624,8 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo * covers the entire screen). */ glGetFloatv(GL_SCISSOR_BOX, scissor); - draw_w = MIN2(img_w - off_x, ceil((scissor[2] - rast_x) / xzoom)); - draw_h = MIN2(img_h - off_y, ceil((scissor[3] - rast_y) / yzoom)); + draw_w = mini(img_w - off_x, ceil((scissor[2] - rast_x) / xzoom)); + draw_h = mini(img_h - off_y, ceil((scissor[3] - rast_y) / yzoom)); if (draw_w > 0 && draw_h > 0) { int old_row_length = glaGetOneInteger(GL_UNPACK_ROW_LENGTH); |