From 2dbd02b576f28224204ac962f6ce20fde6687093 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 16 Nov 2018 10:41:03 +0200 Subject: loplugin:redundantfcast improvements check for calls to constructors, and extend the list of types we check for unnecessary temporary creation Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec Reviewed-on: https://gerrit.libreoffice.org/63472 Tested-by: Jenkins Reviewed-by: Noel Grandin --- tools/source/generic/poly2.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 12d9cb96907d..82b996ed68db 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -58,7 +58,7 @@ void PolyPolygon::Insert( const tools::Polygon& rPoly, sal_uInt16 nPos ) if ( nPos > mpImplPolyPolygon->mvPolyAry.size() ) nPos = mpImplPolyPolygon->mvPolyAry.size(); - mpImplPolyPolygon->mvPolyAry.insert(mpImplPolyPolygon->mvPolyAry.begin() + nPos, tools::Polygon( rPoly )); + mpImplPolyPolygon->mvPolyAry.insert(mpImplPolyPolygon->mvPolyAry.begin() + nPos, rPoly); } void PolyPolygon::Remove( sal_uInt16 nPos ) @@ -72,7 +72,7 @@ void PolyPolygon::Replace( const tools::Polygon& rPoly, sal_uInt16 nPos ) { assert(nPos < Count() && "PolyPolygon::Replace(): nPos >= nSize"); - mpImplPolyPolygon->mvPolyAry[nPos] = tools::Polygon( rPoly ); + mpImplPolyPolygon->mvPolyAry[nPos] = rPoly; } const tools::Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const -- cgit