summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-09 08:36:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-10 13:13:15 +0200
commitf71606c920a3f78294da745cd9ef1eacde010224 (patch)
treeb808351112a9b13fb775f7794d18b0cb8b6e1645 /emfio
parentb28de9d32016a904e4ba457a9a6c62098416c729 (diff)
new loplugin:moveit
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/emfreader.cxx14
-rw-r--r--emfio/source/reader/mtftools.cxx2
-rw-r--r--emfio/source/reader/wmfreader.cxx4
3 files changed, 10 insertions, 10 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 389414c79b9f..1613fd859674 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -730,7 +730,7 @@ namespace emfio
for ( sal_uInt32 i = 0; ( i < nNumberOfPolylines ) && mpInputStream->good(); i++ )
{
tools::Polygon aPolygon = ReadPolygon<T>(0, pnPolylinePointCount[i], nNextPos);
- DrawPolyLine(aPolygon, false, mbRecordPath);
+ DrawPolyLine(std::move(aPolygon), false, mbRecordPath);
}
}
@@ -1218,7 +1218,7 @@ namespace emfio
tools::Long dh = h / 2;
Point aCenter( nX32 + dw, nY32 + dh );
tools::Polygon aPoly( aCenter, dw, dh );
- DrawPolygon( aPoly, mbRecordPath );
+ DrawPolygon( std::move(aPoly), mbRecordPath );
}
}
break;
@@ -1233,7 +1233,7 @@ namespace emfio
Point(nX32, ny32) };
tools::Polygon aPoly(4, aPoints);
aPoly.Optimize( PolyOptimizeFlags::CLOSE );
- DrawPolygon( aPoly, mbRecordPath );
+ DrawPolygon( std::move(aPoly), mbRecordPath );
}
break;
@@ -1241,7 +1241,7 @@ namespace emfio
{
mpInputStream->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nW ).ReadUInt32( nH );
tools::Polygon aRoundRectPoly( ReadRectangle( nX32, nY32, nx32, ny32 ), nW, nH );
- DrawPolygon( aRoundRectPoly, mbRecordPath );
+ DrawPolygon( std::move(aRoundRectPoly), mbRecordPath );
}
break;
@@ -1259,9 +1259,9 @@ namespace emfio
tools::Polygon aPoly(ReadRectangle(nX32, nY32, nx32, ny32), Point(nStartX, nStartY), Point(nEndX, nEndY), PolyStyle::Arc, IsArcDirectionClockWise());
if ( nRecType == EMR_CHORD )
- DrawPolygon( aPoly, mbRecordPath );
+ DrawPolygon( std::move(aPoly), mbRecordPath );
else
- DrawPolyLine( aPoly, nRecType == EMR_ARCTO, mbRecordPath );
+ DrawPolyLine( std::move(aPoly), nRecType == EMR_ARCTO, mbRecordPath );
}
}
break;
@@ -1275,7 +1275,7 @@ namespace emfio
else
{
tools::Polygon aPoly(ReadRectangle(nX32, nY32, nx32, ny32), Point(nStartX, nStartY), Point(nEndX, nEndY), PolyStyle::Pie, IsArcDirectionClockWise());
- DrawPolygon( aPoly, mbRecordPath );
+ DrawPolygon( std::move(aPoly), mbRecordPath );
}
}
break;
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 5cb43ec68510..85429a50152e 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1330,7 +1330,7 @@ namespace emfio
maFillStyle = maBkColor;
mnBkMode = BackgroundMode::OPAQUE;
ImplSetNonPersistentLineColorTransparenz();
- DrawPolygon(aPoly, false);
+ DrawPolygon(std::move(aPoly), false);
mnBkMode = mnBkModeBackup; // The rectangle needs to be always drawned even if mode is transparent
maFillStyle = aFillStyleBackup;
maLineStyle.bTransparent = aTransparentBackup;
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 5f6eeed66757..32b31e015cbc 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -474,7 +474,7 @@ namespace emfio
tools::Polygon aPoly(nPoints);
for (sal_uInt16 i(0); i < nPoints && mpInputStream->good(); ++i)
aPoly[ i ] = ReadPoint();
- DrawPolygon(aPoly, false/*bRecordPath*/);
+ DrawPolygon(std::move(aPoly), false/*bRecordPath*/);
}
SAL_WARN_IF(!bRecordOk, "emfio", "polygon record has more points than we can handle");
@@ -581,7 +581,7 @@ namespace emfio
tools::Polygon aPoly(nPoints);
for (sal_uInt16 i(0); i < nPoints && mpInputStream->good(); ++i)
aPoly[ i ] = ReadPoint();
- DrawPolyLine( aPoly );
+ DrawPolyLine( std::move(aPoly) );
}
SAL_WARN_IF(!bRecordOk, "emfio", "polyline record has more points than we can handle");