vcl/win/gdi/gdiimpl.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
New commits: commit febf27dd63604e67a169639b6c1b4f424022d95b Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Feb 4 14:11:56 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Feb 4 14:50:39 2025 +0100 simplify ImplPreparePolyDraw first parameter is always true Change-Id: I3e85d5ddfc1e706414be595316e5780fb4d1cc8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181102 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 5526daa1e37e..dbc0ab48806d 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -67,8 +67,7 @@ namespace { // #100127# Fill point and flag memory from array of points which // might also contain bezier control points for the PolyDraw() GDI method // Make sure pWinPointAry and pWinFlagAry are big enough -void ImplPreparePolyDraw( bool bCloseFigures, - sal_uLong nPoly, +void ImplPreparePolyDraw( sal_uLong nPoly, const sal_uInt32* pPoints, const Point* const* pPtAry, const PolyFlags* const* pFlgAry, @@ -133,9 +132,8 @@ void ImplPreparePolyDraw( bool bCloseFigures, ++nCurrPoint; } - // end figure? - if( bCloseFigures ) - pWinFlagAry[-1] |= PT_CLOSEFIGURE; + // end figure + pWinFlagAry[-1] |= PT_CLOSEFIGURE; } } } @@ -1716,7 +1714,7 @@ bool WinSalGraphicsImpl::drawPolygonBezier( sal_uInt32 nPoints, const Point* pPt } sal_uInt32 nPoints_i32(nPoints); - ImplPreparePolyDraw(true, 1, &nPoints_i32, &pPtAry, &pFlgAry, pWinPointAry, pWinFlagAry); + ImplPreparePolyDraw(1, &nPoints_i32, &pPtAry, &pFlgAry, pWinPointAry, pWinFlagAry); bool bRet( false ); @@ -1763,7 +1761,7 @@ bool WinSalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt pWinFlagAry = aStackAry2; } - ImplPreparePolyDraw(true, nPoly, pPoints, pPtAry, pFlgAry, pWinPointAry, pWinFlagAry); + ImplPreparePolyDraw(nPoly, pPoints, pPtAry, pFlgAry, pWinPointAry, pWinFlagAry); bool bRet( false );