diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-02 14:45:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-03 08:17:44 +0200 |
commit | 24218c21712bc900a6641bd1844878f07b173df7 (patch) | |
tree | 586f30baa35e102d0a08f745adb23c3f101e8f93 /sw/source/core/text/txtdrop.cxx | |
parent | 3769a6271120e0e856b53f906654bc2c593804fe (diff) |
loplugin:useuniqueptr in SwDropPortionPart
Change-Id: I9aaaeb2b5cb05d350059554555ecb0c195c51a74
Reviewed-on: https://gerrit.libreoffice.org/56830
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/text/txtdrop.cxx')
-rw-r--r-- | sw/source/core/text/txtdrop.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 317eb084a4c1..6ced927d91cb 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -95,8 +95,8 @@ SwDropSave::~SwDropSave() /// SwDropPortionPart DTor SwDropPortionPart::~SwDropPortionPart() { - delete pFollow; - delete pFnt; + pFollow.reset(); + pFnt.reset(); } /// SwDropPortion CTor, DTor @@ -641,7 +641,7 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf ) if ( ! pCurrPart ) pDropPor->SetPart( pPart ); else - pCurrPart->SetFollow( pPart ); + pCurrPart->SetFollow( std::unique_ptr<SwDropPortionPart>(pPart) ); pCurrPart = pPart; } |