Kaydet (Commit) 02caaef2 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SbiProcDef

Change-Id: I31c43f8fe40d90094d550b02c5d6213e59149bad
Reviewed-on: https://gerrit.libreoffice.org/58486
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst cd6486b1
......@@ -1032,7 +1032,7 @@ void SbiParser::DefDeclare( bool bPrivate )
}
else
{
pDef->Match( p );
pDef->Match( std::unique_ptr<SbiProcDef>(p) );
}
}
else
......@@ -1214,7 +1214,7 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate )
}
}
pDef->Match( pProc );
pDef->Match( std::unique_ptr<SbiProcDef>(pProc) );
pProc = pDef;
}
else
......
......@@ -409,7 +409,7 @@ void SbiProcDef::SetType( SbxDataType t )
// if the match is OK, pOld is replaced by this in the pool
// pOld is deleted in any case!
void SbiProcDef::Match( SbiProcDef* pOld )
void SbiProcDef::Match( std::unique_ptr<SbiProcDef> pOld )
{
SbiSymDef *pn=nullptr;
// parameter 0 is the function name
......@@ -443,7 +443,6 @@ void SbiProcDef::Match( SbiProcDef* pOld )
std::swap(pIn->m_Data[nPos], tmp);
tmp.release();
}
delete pOld;
}
void SbiProcDef::setPropertyMode( PropertyMode ePropMode )
......
......@@ -194,7 +194,7 @@ public:
// Match with a forward-declaration. The parameter names are
// compared and the forward declaration is replaced by this
void Match( SbiProcDef* pForward );
void Match( std::unique_ptr<SbiProcDef> pForward );
private:
SbiProcDef( const SbiProcDef& ) = delete;
......
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