diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-18 08:59:57 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-18 07:54:20 +0100 |
commit | c70b00820ec46035e50c7922876c5423c2f5f936 (patch) | |
tree | c9d8e0e40b61e5ebd66a41550c60c88c4593c37b /tools | |
parent | aa433278f4276142250378ede75ef8aa9f16d972 (diff) |
Reduce variable scope
Change-Id: Ie1adad9228c4eadbe0d314c0dc27057e84cd721a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106037
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/poly.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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()); |