=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: user32/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: 501778aa0873faa24632cee2390c15f79c49a943
URL: https://source.winehq.org/git/wine.git/?a=commit;h=501778aa0873faa24632cee2390c15f79c49a943
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Wed Jun 5 14:39:00 2019 +0300
user32/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/user32/edit.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 3c5331f..00900e6 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);
}
}
More information about the wine-cvs
mailing list