Skip to content

Commit

Permalink
Move trivial check before expensive check
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 11, 2021
1 parent 59a2286 commit 83dafc5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/providers/ogr/qgsogrfeatureiterator.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 83dafc5

Please sign in to comment.