loplugin:useuniqueptr in filter
Change-Id: I127b570bb1563dc75b21633019b3640f93715d77 Reviewed-on: https://gerrit.libreoffice.org/41495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user