[PATCH v2 5/6] comctl32/listview: Get rid of useless float cast
Gabriel Ivăncescu
gabrielopcode at gmail.com
Wed Jun 5 06:39:01 CDT 2019
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
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..213d55a 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;
--
2.21.0
More information about the wine-devel
mailing list