diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-11 12:36:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-11 14:59:18 +0100 |
commit | 4b941b7b7fd79415935c8f2d3ce900eb64a40f66 (patch) | |
tree | 511649625a97082b02047369dc68cd4d8f33965e /tools | |
parent | 48053ba5a110360b6d5eb19b6fb8a88e904b85c2 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/poly.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
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 ) |