diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-15 17:12:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-18 11:12:09 +0200 |
commit | 6927f127699ac47c0989df23c5b0d00ab067e20f (patch) | |
tree | f79f9ed38942944a0b5c651fe1edeb1ae000224b | |
parent | 9c3cf7a3f738b407b74909220ac68e7382f414e1 (diff) |
loplugin:useuniqueptr in SwWW8ImplReader::LoadThroughDecryption
Change-Id: I76d6e2c2a4b9adf916c2fe12956c81ab4b63d885
Reviewed-on: https://gerrit.libreoffice.org/60613
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
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; |