summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-31 15:40:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-12 08:43:48 +0200
commite4e4d5713e248f02faf7aa6199b11e152973de8e (patch)
tree836dffa89d0a966e41b1af8270db74b9590def22 /sfx2
parentd4eabd5da8ea3b5ac40659c22cde19b26b3c002b (diff)
clang-tidy readability-delete-null-pointer
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/request.cxx3
-rw-r--r--sfx2/source/doc/docfile.cxx3
2 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 77a7e4d6d5d7..b9bcabb547a6 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -419,8 +419,7 @@ void SfxRequest::RemoveItem( sal_uInt16 nID )
void SfxRequest::SetReturnValue(const SfxPoolItem &rItem)
{
DBG_ASSERT(!pImpl->pRetVal, "Set Return value multiple times?");
- if(pImpl->pRetVal)
- delete pImpl->pRetVal;
+ delete pImpl->pRetVal;
pImpl->pRetVal = rItem.Clone();
}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 8f8059e25571..b86dba5a7d58 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3470,8 +3470,7 @@ void SfxMedium::CreateTempFile( bool bReplace )
void SfxMedium::CreateTempFileNoCopy()
{
// this call always replaces the existing temporary file
- if ( pImpl->pTempFile )
- delete pImpl->pTempFile;
+ delete pImpl->pTempFile;
pImpl->pTempFile = new ::utl::TempFile();
pImpl->pTempFile->EnableKillingFile();