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

loplugin:useuniqueptr in LwpFribSection

Change-Id: I128a2ef532a72b47cd2bedd1ee80f47d892cc527
Reviewed-on: https://gerrit.libreoffice.org/50727Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e21d9c89
......@@ -70,18 +70,13 @@
#include <lwpglobalmgr.hxx>
LwpFribSection::LwpFribSection(LwpPara *pPara)
: LwpFrib(pPara),m_pMasterPage(nullptr)
: LwpFrib(pPara)
{
}
LwpFribSection::~LwpFribSection()
{
if(m_pMasterPage)
{
delete m_pMasterPage;
m_pMasterPage = nullptr;
}
}
/**
......@@ -111,7 +106,7 @@ void LwpFribSection::RegisterSectionStyle()
LwpPageLayout* pLayout = GetPageLayout();
if(pLayout)
{
m_pMasterPage = new LwpMasterPage(m_pPara, pLayout);
m_pMasterPage.reset( new LwpMasterPage(m_pPara, pLayout) );
m_pMasterPage->RegisterMasterPage(this);
}
}
......
......@@ -118,7 +118,7 @@ private:
private:
LwpObjectID m_Section;
LwpMasterPage* m_pMasterPage;
std::unique_ptr<LwpMasterPage> m_pMasterPage;
};
#endif
......
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