From c92ab5c3ef2d8339650eb95cd2ebba8c6956b62d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Aug 2012 20:34:05 +0000 Subject: code cleanup: use rect size macros --- source/blender/blenlib/intern/rct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index 92cbcd485b6..ac9ac39893b 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -366,9 +366,9 @@ int BLI_rcti_isect(const rcti *src1, const rcti *src2, rcti *dest) void BLI_rcti_rctf_copy(rcti *dst, const rctf *src) { dst->xmin = floorf(src->xmin + 0.5f); - dst->xmax = dst->xmin + floorf((src->xmax - src->xmin) + 0.5f); + dst->xmax = dst->xmin + floorf(BLI_RCT_SIZE_X(src) + 0.5f); dst->ymin = floorf(src->ymin + 0.5f); - dst->ymax = dst->ymin + floorf((src->ymax - src->ymin) + 0.5f); + dst->ymax = dst->ymin + floorf(BLI_RCT_SIZE_Y(src) + 0.5f); } void BLI_rctf_rcti_copy(rctf *dst, const rcti *src) -- cgit v1.2.3