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

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


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

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

comctl32/edit: 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/edit.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c
index e64e260..bdd3b72 100644
--- a/dlls/comctl32/edit.c
+++ b/dlls/comctl32/edit.c
@@ -5017,7 +5017,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
     case WM_MOUSEWHEEL:
     {
         int wheelDelta;
-        UINT pulScrollLines = 3;
+        INT pulScrollLines = 3;
         SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0, &pulScrollLines, 0);
 
         if (wParam & (MK_SHIFT | MK_CONTROL))
@@ -5037,9 +5037,9 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
         if (es->wheelDeltaRemainder && pulScrollLines)
         {
             int cLineScroll;
-            pulScrollLines = (int) min((UINT) es->line_count, pulScrollLines);
-            cLineScroll = pulScrollLines * (float)es->wheelDeltaRemainder / WHEEL_DELTA;
-            es->wheelDeltaRemainder -= WHEEL_DELTA * cLineScroll / (int)pulScrollLines;
+            pulScrollLines = min(es->line_count, pulScrollLines);
+            cLineScroll = pulScrollLines * es->wheelDeltaRemainder / WHEEL_DELTA;
+            es->wheelDeltaRemainder -= WHEEL_DELTA * cLineScroll / pulScrollLines;
             result = EDIT_EM_LineScroll(es, 0, -cLineScroll);
         }
         break;




More information about the wine-cvs mailing list