Kaydet (Commit) 4fb9d7b6 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in filter

Change-Id: I127b570bb1563dc75b21633019b3640f93715d77
Reviewed-on: https://gerrit.libreoffice.org/41495Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 66604baf
......@@ -574,7 +574,7 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
{
for ( std::deque<DXFEdgeType*>::size_type i = 0; i < rPathData.aEdges.size(); i++ )
{
const DXFEdgeType* pEdge = rPathData.aEdges[ i ];
const DXFEdgeType* pEdge = rPathData.aEdges[ i ].get();
switch( pEdge->nEdgeType )
{
case 1 :
......
......@@ -562,8 +562,6 @@ DXFBoundaryPathData::DXFBoundaryPathData() :
DXFBoundaryPathData::~DXFBoundaryPathData()
{
for (auto i: aEdges)
delete i;
}
bool DXFBoundaryPathData::EvaluateGroup( DXFGroupReader & rDGR )
......@@ -619,10 +617,10 @@ bool DXFBoundaryPathData::EvaluateGroup( DXFGroupReader & rDGR )
sal_Int32 nEdgeType = rDGR.GetI();
switch( nEdgeType )
{
case 1 : aEdges.push_back( new DXFEdgeTypeLine() ); break;
case 2 : aEdges.push_back( new DXFEdgeTypeCircularArc() ); break;
case 3 : aEdges.push_back( new DXFEdgeTypeEllipticalArc() ); break;
case 4 : aEdges.push_back( new DXFEdgeTypeSpline() ); break;
case 1 : aEdges.emplace_back( new DXFEdgeTypeLine() ); break;
case 2 : aEdges.emplace_back( new DXFEdgeTypeCircularArc() ); break;
case 3 : aEdges.emplace_back( new DXFEdgeTypeEllipticalArc() ); break;
case 4 : aEdges.emplace_back( new DXFEdgeTypeSpline() ); break;
}
}
else if ( aEdges.size() )
......
......@@ -412,7 +412,7 @@ struct DXFBoundaryPathData
sal_Int32 nPointIndex;
std::unique_ptr<DXFVector[]> pP;
std::deque<DXFEdgeType*> aEdges;
std::deque<std::unique_ptr<DXFEdgeType>> aEdges;
DXFBoundaryPathData();
~DXFBoundaryPathData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment