Michael Stefaniuc : user32: Use InflateRect() instead of open coding it.

Alexandre Julliard julliard at winehq.org
Mon Jun 6 10:19:51 CDT 2016


Module: wine
Branch: master
Commit: 9ed915083f2749a47a70c7c6cfe48d9955d317fa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9ed915083f2749a47a70c7c6cfe48d9955d317fa

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Mon Jun  6 11:16:11 2016 +0200

user32: Use InflateRect() instead of open coding it.

Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 a210962..4b572e5 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 );
 }




More information about the wine-cvs mailing list