[Libreoffice-commits] core.git: tools/source

Caolán McNamara caolanm at redhat.com
Mon Dec 11 14:02:05 UTC 2017


 tools/source/generic/poly.cxx |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 4b941b7b7fd79415935c8f2d3ce900eb64a40f66
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 11 12:36:24 2017 +0000

    just delete, don't check for null and then delete
    
    Change-Id: I4b3ebaadfe72c2c369ae6ad49abfb0d6626e9d71
    Reviewed-on: https://gerrit.libreoffice.org/46228
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 664428426352..c00627965c64 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -516,11 +516,8 @@ bool ImplPolygon::operator==( const ImplPolygon& rCandidate) const
 
 ImplPolygon::~ImplPolygon()
 {
-    if ( mpPointAry )
-        delete[] mpPointAry;
-
-    if( mpFlagAry )
-        delete[] mpFlagAry;
+    delete[] mpPointAry;
+    delete[] mpFlagAry;
 }
 
 void ImplPolygon::ImplInitDefault()
@@ -586,8 +583,7 @@ void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, bool bResize )
     else
         pNewAry = nullptr;
 
-    if ( mpPointAry )
-        delete[] mpPointAry;
+    delete[] mpPointAry;
 
     // take FlagArray into account, if applicable
     if( mpFlagAry )


More information about the Libreoffice-commits mailing list