[Libreoffice-commits] core.git: tools/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 18 06:54:59 UTC 2020
tools/source/generic/poly.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit c70b00820ec46035e50c7922876c5423c2f5f936
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Nov 18 08:59:57 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Nov 18 07:54:20 2020 +0100
Reduce variable scope
Change-Id: Ie1adad9228c4eadbe0d314c0dc27057e84cd721a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106037
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index a88a9fd9ec00..73531236f522 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1606,7 +1606,6 @@ bool Polygon::IsEqual( const tools::Polygon& rPoly ) const
SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly )
{
- sal_uInt16 i;
sal_uInt16 nPoints(0);
// read all points and create array
@@ -1621,7 +1620,7 @@ SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly )
rPoly.mpImplPolygon->ImplSetSize( nPoints, false );
- for (i = 0; i < nPoints; i++)
+ for (sal_uInt16 i = 0; i < nPoints; i++)
{
sal_Int32 nTmpX(0), nTmpY(0);
rIStream.ReadInt32(nTmpX).ReadInt32(nTmpY);
@@ -1634,13 +1633,12 @@ SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly )
SvStream& WritePolygon( SvStream& rOStream, const tools::Polygon& rPoly )
{
- sal_uInt16 i;
sal_uInt16 nPoints = rPoly.GetSize();
// Write number of points
rOStream.WriteUInt16( nPoints );
- for (i = 0; i < nPoints; i++)
+ for (sal_uInt16 i = 0; i < nPoints; i++)
{
rOStream.WriteInt32(rPoly.mpImplPolygon->mxPointAry[i].X())
.WriteInt32(rPoly.mpImplPolygon->mxPointAry[i].Y());
More information about the Libreoffice-commits
mailing list