Skip to content
Permalink
Browse files

Use qgsgeometry_cast rather than dynamic_cast

  • Loading branch information
m-kuhn committed Oct 1, 2018
1 parent f82970d commit e300387b521ca7486b532bdabe42aeecf64daa75
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.cpp
@@ -302,12 +302,12 @@ QList<const QgsLineString *> QgsGeometryCheckerUtils::polygonRings( const QgsPol

void QgsGeometryCheckerUtils::filter1DTypes( QgsAbstractGeometry *geom )
{
if ( dynamic_cast<QgsGeometryCollection *>( geom ) )
if ( qgsgeometry_cast<QgsGeometryCollection *>( geom ) )
{
QgsGeometryCollection *geomCollection = static_cast<QgsGeometryCollection *>( geom );
for ( int nParts = geom->partCount(), iPart = nParts - 1; iPart >= 0; --iPart )
{
if ( !dynamic_cast<QgsSurface *>( geomCollection->geometryN( iPart ) ) )
if ( !qgsgeometry_cast<QgsSurface *>( geomCollection->geometryN( iPart ) ) )
{
geomCollection->removeGeometry( iPart );
}

0 comments on commit e300387

Please sign in to comment.
You can’t perform that action at this time.