Skip to content

Commit e300387

Browse files
committed
Use qgsgeometry_cast rather than dynamic_cast
1 parent f82970d commit e300387

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,12 @@ QList<const QgsLineString *> QgsGeometryCheckerUtils::polygonRings( const QgsPol
302302

303303
void QgsGeometryCheckerUtils::filter1DTypes( QgsAbstractGeometry *geom )
304304
{
305-
if ( dynamic_cast<QgsGeometryCollection *>( geom ) )
305+
if ( qgsgeometry_cast<QgsGeometryCollection *>( geom ) )
306306
{
307307
QgsGeometryCollection *geomCollection = static_cast<QgsGeometryCollection *>( geom );
308308
for ( int nParts = geom->partCount(), iPart = nParts - 1; iPart >= 0; --iPart )
309309
{
310-
if ( !dynamic_cast<QgsSurface *>( geomCollection->geometryN( iPart ) ) )
310+
if ( !qgsgeometry_cast<QgsSurface *>( geomCollection->geometryN( iPart ) ) )
311311
{
312312
geomCollection->removeGeometry( iPart );
313313
}

0 commit comments

Comments
 (0)