From 501778aa0873faa24632cee2390c15f79c49a943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= Date: Wed, 5 Jun 2019 14:39:00 +0300 Subject: [PATCH] user32/edit: Get rid of useless casts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gabriel Ivăncescu Signed-off-by: Alexandre Julliard --- dlls/user32/edit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 3c5331f9dc8..00900e648ba 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -5158,7 +5158,7 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B case WM_MOUSEWHEEL: { int wheelDelta; - UINT pulScrollLines = 3; + INT pulScrollLines = 3; SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0, &pulScrollLines, 0); if (wParam & (MK_SHIFT | MK_CONTROL)) { @@ -5175,9 +5175,9 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B 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); } }