Skip to content
Permalink
Browse files

Move trivial check before expensive check

  • Loading branch information
nyalldawson committed Mar 11, 2021
1 parent 59a2286 commit 83dafc57b1b88279429896c749c3b0e1767f01ba
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/core/providers/ogr/qgsogrfeatureiterator.cpp
@@ -534,12 +534,12 @@ bool QgsOgrFeatureIterator::readFeature( const gdal::ogr_feature_unique_ptr &fet
{
// OK
}
else if ( ( useIntersect && ( !feature.hasGeometry()
|| ( mRequest.flags() & QgsFeatureRequest::ExactIntersect && !feature.geometry().intersects( mFilterRect ) )
|| ( !( mRequest.flags() & QgsFeatureRequest::ExactIntersect ) && !feature.geometry().boundingBoxIntersects( mFilterRect ) )
)
)
|| ( geometryTypeFilter && ( !feature.hasGeometry() || QgsOgrProvider::ogrWkbSingleFlatten( ( OGRwkbGeometryType )feature.geometry().wkbType() ) != mSource->mOgrGeometryTypeFilter ) ) )
else if ( ( geometryTypeFilter && ( !feature.hasGeometry() || QgsOgrProvider::ogrWkbSingleFlatten( ( OGRwkbGeometryType )feature.geometry().wkbType() ) != mSource->mOgrGeometryTypeFilter ) )
|| ( useIntersect && ( !feature.hasGeometry()
|| ( mRequest.flags() & QgsFeatureRequest::ExactIntersect && !feature.geometry().intersects( mFilterRect ) )
|| ( !( mRequest.flags() & QgsFeatureRequest::ExactIntersect ) && !feature.geometry().boundingBoxIntersects( mFilterRect ) )
)
) )
{
return false;
}

0 comments on commit 83dafc5

Please sign in to comment.