sw/source/filter/ww8/ww8par.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit 6927f127699ac47c0989df23c5b0d00ab067e20f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Sep 15 17:12:13 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Sep 18 11:12:09 2018 +0200 loplugin:useuniqueptr in SwWW8ImplReader::LoadThroughDecryption Change-Id: I76d6e2c2a4b9adf916c2fe12956c81ab4b63d885 Reviewed-on: https://gerrit.libreoffice.org/60613 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index fbcddce801cf..90cda2ccec3d 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5448,9 +5448,9 @@ ErrCode SwWW8ImplReader::SetSubStreams(tools::SvRef<SotStorageStream> &rTableStr namespace { - utl::TempFile *MakeTemp(SvFileStream &rSt) + std::unique_ptr<utl::TempFile> MakeTemp(SvFileStream &rSt) { - utl::TempFile *pT = new utl::TempFile; + std::unique_ptr<utl::TempFile> pT(new utl::TempFile); pT->EnableKillingFile(); rSt.Open(pT->GetFileName(), StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE); return pT; @@ -5686,9 +5686,9 @@ ErrCode SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss) if (!nErrRet) nErrRet = SetSubStreams(xTableStream, xDataStream); - utl::TempFile *pTempMain = nullptr; - utl::TempFile *pTempTable = nullptr; - utl::TempFile *pTempData = nullptr; + std::unique_ptr<utl::TempFile> pTempMain; + std::unique_ptr<utl::TempFile> pTempTable; + std::unique_ptr<utl::TempFile> pTempData; SvFileStream aDecryptMain; SvFileStream aDecryptTable; SvFileStream aDecryptData; @@ -5856,9 +5856,9 @@ ErrCode SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss) if (!nErrRet) nErrRet = CoreLoad(pGloss); - delete pTempMain; - delete pTempTable; - delete pTempData; + pTempMain.reset(); + pTempTable.reset(); + pTempData.reset(); m_xWwFib.reset(); return nErrRet; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits