From d29ec080077962affda48e3518e5a49210dfc961 Mon Sep 17 00:00:00 2001 From: "Martin T. H. Sandsmark" Date: Mon, 11 Jul 2016 22:29:20 +0200 Subject: [PATCH] remove invalid null pointer checks --- core/area.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/core/area.h b/core/area.h index a595f429c..ccd9fbee7 100644 --- a/core/area.h +++ b/core/area.h @@ -656,9 +656,6 @@ void RegularArea::simplify() template bool RegularArea::isNull() const { - if ( !this ) - return false; - if ( this->isEmpty() ) return false; @@ -673,9 +670,6 @@ bool RegularArea::isNull() const template bool RegularArea::intersects( const NormalizedShape& rect ) const { - if ( !this ) - return false; - if ( this->isEmpty() ) return false; @@ -725,9 +719,6 @@ void RegularArea::appendArea( const RegularArea void RegularArea::appendShape( const NormalizedShape& shape, MergeSide side ) { - if ( !this ) - return; - int size = this->count(); // if the list is empty, adds the shape normally if ( size == 0 ) @@ -800,9 +791,6 @@ void RegularArea::appendShape( const NormalizedShape& sh template bool RegularArea::contains( double x, double y ) const { - if ( !this ) - return false; - if ( this->isEmpty() ) return false; @@ -829,7 +817,7 @@ bool RegularArea::contains( const NormalizedShape& shape template QList RegularArea::geometry( int xScale, int yScale, int dx, int dy ) const { - if ( !this || this->isEmpty() ) + if ( this->isEmpty() ) return QList(); QList ret; @@ -848,9 +836,6 @@ QList RegularArea::geometry( int xScale, int ySca template void RegularArea::transform( const QTransform &matrix ) { - if ( !this ) - return; - if ( this->isEmpty() ) return;