summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/docsort.cxx4
-rw-r--r--sw/source/core/text/wrong.cxx6
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx5
4 files changed, 5 insertions, 12 deletions
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index e08b6987a8d5..945104ceaabc 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -771,9 +771,7 @@ FlatFndBox::~FlatFndBox()
{
FndBox_** ppTmp = const_cast<FndBox_**>(pArr);
delete [] ppTmp;
-
- if( ppItemSets )
- delete [] ppItemSets;
+ delete [] ppItemSets;
}
/// All Lines of a Box need to have same number of Boxes
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index e7f4b0d85b47..6da8afc1f209 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -83,8 +83,7 @@ void SwWrongList::ClearList()
{
for (SwWrongArea & i : maList)
{
- if (i.mpSubList)
- delete i.mpSubList;
+ delete i.mpSubList;
i.mpSubList = nullptr;
}
maList.clear();
@@ -573,8 +572,7 @@ void SwWrongList::Remove(sal_uInt16 nIdx, sal_uInt16 nLen )
std::vector<SwWrongArea>::iterator iLoop = i1;
while ( iLoop != i2 )
{
- if ( (*iLoop).mpSubList )
- delete (*iLoop).mpSubList;
+ delete (*iLoop).mpSubList;
++iLoop;
}
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 500185107abf..f6ff3e80ee4b 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -200,7 +200,7 @@ SwUndoInsert::~SwUndoInsert()
rUNds.GetEndOfExtras().GetIndex() - m_pUndoNodeIndex->GetIndex());
m_pUndoNodeIndex.reset();
}
- else if( pText ) // the inserted text
+ else // the inserted text
delete pText;
delete pRedlData;
delete pUndoText;
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 1954d3039307..88b6fca91adb 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -3396,10 +3396,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
//The TOC field representation contents should be inserted into TOC section, but not after TOC section.
//So we need update the document position when loading TOC representation and after loading TOC;
- if (m_pPosAfterTOC)
- {
- delete m_pPosAfterTOC;
- }
+ delete m_pPosAfterTOC;
m_pPosAfterTOC = new SwPaM(*m_pPaM, m_pPaM);
(*m_pPaM).Move(fnMoveBackward);
SwPaM aRegion(*m_pPaM, m_pPaM);