From 9ed915083f2749a47a70c7c6cfe48d9955d317fa Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 6 Jun 2016 11:16:11 +0200 Subject: [PATCH] user32: Use InflateRect() instead of open coding it. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/user32/scroll.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index a210962b3c0..4b572e59f9e 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -360,18 +360,12 @@ static BOOL SCROLL_PtInRectEx( LPRECT lpRect, POINT pt, BOOL vertical ) if (vertical) { scrollbarWidth = lpRect->right - lpRect->left; - rect.left -= scrollbarWidth*8; - rect.right += scrollbarWidth*8; - rect.top -= scrollbarWidth*2; - rect.bottom += scrollbarWidth*2; + InflateRect(&rect, scrollbarWidth * 8, scrollbarWidth * 2); } else { scrollbarWidth = lpRect->bottom - lpRect->top; - rect.left -= scrollbarWidth*2; - rect.right += scrollbarWidth*2; - rect.top -= scrollbarWidth*8; - rect.bottom += scrollbarWidth*8; + InflateRect(&rect, scrollbarWidth * 2, scrollbarWidth * 8); } return PtInRect( &rect, pt ); }