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/interface/interface_widgets.c | |
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/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 7b139d81a1c..b439271b23d 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -346,7 +346,8 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl const int vnum = ((roundboxalign & (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT)) == (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT) || (roundboxalign & (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) == (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) ? 1 : 2; - minsize = MIN2((rect->xmax - rect->xmin) * hnum, (rect->ymax - rect->ymin) * vnum); + minsize = mini((rect->xmax - rect->xmin) * hnum, + (rect->ymax - rect->ymin) * vnum); if (2.0f * rad > minsize) rad = 0.5f * minsize; |