summaryrefslogtreecommitdiff
path: root/sd/source
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 /sd/source
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 'sd/source')
-rw-r--r--sd/source/filter/eppt/pptx-grouptable.cxx3
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx3
-rw-r--r--sd/source/ui/view/OutlinerIterator.cxx3
-rw-r--r--sd/source/ui/view/drviewsc.cxx5
-rw-r--r--sd/source/ui/view/viewshel.cxx3
5 files changed, 5 insertions, 12 deletions
diff --git a/sd/source/filter/eppt/pptx-grouptable.cxx b/sd/source/filter/eppt/pptx-grouptable.cxx
index 2e092220cb3c..712de6ac694f 100644
--- a/sd/source/filter/eppt/pptx-grouptable.cxx
+++ b/sd/source/filter/eppt/pptx-grouptable.cxx
@@ -45,8 +45,7 @@ void GroupTable::ImplResizeGroupTable( sal_uInt32 nEntrys )
GroupEntry** pTemp = new GroupEntry*[ nEntrys ];
for ( sal_uInt32 i = 0; i < mnCurrentGroupEntry; i++ )
pTemp[ i ] = mpGroupEntry[ i ];
- if ( mpGroupEntry )
- delete[] mpGroupEntry;
+ delete[] mpGroupEntry;
mpGroupEntry = pTemp;
}
}
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 359b5ad5eda2..edd6d0f19414 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -591,8 +591,7 @@ void MasterPagesSelector::ClearPageSet()
for (size_t nIndex=1; nIndex<=PreviewValueSet::GetItemCount(); nIndex++)
{
UserData* pData = GetUserData(nIndex);
- if (pData != nullptr)
- delete pData;
+ delete pData;
}
PreviewValueSet::Clear();
}
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 0126a1d3a57b..88c66acb4ca4 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -684,8 +684,7 @@ void ViewIteratorImpl::Reverse()
IteratorImplBase::Reverse ();
// Create reversed object list iterator.
- if (mpObjectIterator != nullptr)
- delete mpObjectIterator;
+ delete mpObjectIterator;
if (mpPage != nullptr)
mpObjectIterator = new SdrObjListIter(*mpPage, SdrIterMode::DeepNoGroups, ! mbDirectionIsForward);
else
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 9f245cc9aa52..5bbf7ff27c49 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -76,10 +76,7 @@ void DrawViewShell::UpdateIMapDlg( SdrObject* pObj )
SvxIMapDlgChildWindow::UpdateIMapDlg( aGraphic, pIMap, pTargetList, pObj );
// We can delete the target list
- if ( pTargetList )
- {
- delete pTargetList;
- }
+ delete pTargetList;
}
}
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 61dd557f5d07..75e61456b181 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1683,8 +1683,7 @@ SfxShell* ViewShellObjectBarFactory::CreateShell( ::sd::ShellId nId )
void ViewShellObjectBarFactory::ReleaseShell (SfxShell* pShell)
{
- if (pShell != nullptr)
- delete pShell;
+ delete pShell;
}
} // end of anonymous namespace