From fd38a6f7887222465b771b8c31be6c208bdffe70 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sat, 25 Nov 2023 14:07:46 +0900 Subject: [PATCH] [MSPAINT] mouse.cpp: Erase type warnings of SIZE_T vs. INT CORE-19094 --- base/applications/mspaint/mouse.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/base/applications/mspaint/mouse.cpp b/base/applications/mspaint/mouse.cpp index 2f97ad9d079..af8fb48ab25 100644 --- a/base/applications/mspaint/mouse.cpp +++ b/base/applications/mspaint/mouse.cpp @@ -53,7 +53,7 @@ BOOL nearlyEqualPoints(INT x0, INT y0, INT x1, INT y1) return (abs(x1 - x0) <= cxThreshold) && (abs(y1 - y0) <= cyThreshold); } -void getBoundaryOfPtStack(RECT& rcBoundary, INT cPoints, const POINT *pPoints) +void getBoundaryOfPtStack(RECT& rcBoundary, SIZE_T cPoints, const POINT *pPoints) { POINT ptMin = { MAXLONG, MAXLONG }, ptMax = { (LONG)MINLONG, (LONG)MINLONG }; while (cPoints-- > 0) @@ -94,7 +94,7 @@ void BuildMaskFromPtStack() ::FillRect(hdcMem, &rc, (HBRUSH)::GetStockObject(BLACK_BRUSH)); HGDIOBJ hPenOld = ::SelectObject(hdcMem, GetStockObject(NULL_PEN)); HGDIOBJ hbrOld = ::SelectObject(hdcMem, GetStockObject(WHITE_BRUSH)); - ::Polygon(hdcMem, s_pointStack, s_pointSP); + ::Polygon(hdcMem, s_pointStack, (INT)s_pointSP); ::SelectObject(hdcMem, hbrOld); ::SelectObject(hdcMem, hPenOld); ::SelectObject(hdcMem, hbmOld); @@ -560,7 +560,7 @@ struct FreeSelTool : SelectionBaseTool if (!selectionModel.m_bShow && m_bDrawing) { /* Draw the freehand selection inverted/xored */ - Poly(hdc, s_pointStack, s_pointSP, 0, 0, 2, 0, FALSE, TRUE); + Poly(hdc, s_pointStack, (INT)s_pointSP, 0, 0, 2, 0, FALSE, TRUE); } } }; @@ -1008,9 +1008,9 @@ struct ShapeTool : ToolBase return; if (m_bLeftButton) - Poly(hdc, s_pointStack, s_pointSP, m_fg, m_bg, toolsModel.GetLineWidth(), toolsModel.GetShapeStyle(), m_bClosed, FALSE); + Poly(hdc, s_pointStack, (INT)s_pointSP, m_fg, m_bg, toolsModel.GetLineWidth(), toolsModel.GetShapeStyle(), m_bClosed, FALSE); else - Poly(hdc, s_pointStack, s_pointSP, m_bg, m_fg, toolsModel.GetLineWidth(), toolsModel.GetShapeStyle(), m_bClosed, FALSE); + Poly(hdc, s_pointStack, (INT)s_pointSP, m_bg, m_fg, toolsModel.GetLineWidth(), toolsModel.GetShapeStyle(), m_bClosed, FALSE); } void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override