=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: comctl32/listview: Get rid of useless casts.

Alexandre Julliard julliard at winehq.org
Fri Jun 14 16:52:17 CDT 2019


Module: wine
Branch: master
Commit: a0a3d6161c6ea23b5f7ac43e107bfed3dd423c9d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a0a3d6161c6ea23b5f7ac43e107bfed3dd423c9d

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Wed Jun  5 14:39:01 2019 +0300

comctl32/listview: Get rid of useless casts.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/listview.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 4ecff20..2717812 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -9909,7 +9909,7 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode,
 
 static LRESULT LISTVIEW_MouseWheel(LISTVIEW_INFO *infoPtr, INT wheelDelta)
 {
-    UINT pulScrollLines = 3;
+    INT pulScrollLines = 3;
 
     TRACE("(wheelDelta=%d)\n", wheelDelta);
 
@@ -9938,8 +9938,8 @@ static LRESULT LISTVIEW_MouseWheel(LISTVIEW_INFO *infoPtr, INT wheelDelta)
         {
             int cLineScroll;
             pulScrollLines = min((UINT)LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines);
-            cLineScroll = pulScrollLines * (float)infoPtr->cWheelRemainder / WHEEL_DELTA;
-            infoPtr->cWheelRemainder -= WHEEL_DELTA * cLineScroll / (int)pulScrollLines;
+            cLineScroll = pulScrollLines * infoPtr->cWheelRemainder / WHEEL_DELTA;
+            infoPtr->cWheelRemainder -= WHEEL_DELTA * cLineScroll / pulScrollLines;
             LISTVIEW_VScroll(infoPtr, SB_INTERNAL, -cLineScroll);
         }
         break;




More information about the wine-cvs mailing list