Skip to content
Permalink
Browse files

Simplify and harden code for geometry collections

  • Loading branch information
m-kuhn committed Dec 15, 2015
1 parent e7a0167 commit b31943574311c689e34a51c096de78ab1d0bc204
Showing with 2 additions and 10 deletions.
  1. +2 −10 src/core/geometry/qgsgeometrycollectionv2.cpp
@@ -82,20 +82,12 @@ int QgsGeometryCollectionV2::numGeometries() const

const QgsAbstractGeometryV2* QgsGeometryCollectionV2::geometryN( int n ) const
{
if ( n >= mGeometries.size() )
{
return nullptr;
}
return mGeometries.at( n );
return mGeometries.value( n );
}

QgsAbstractGeometryV2* QgsGeometryCollectionV2::geometryN( int n )
{
if ( n < 0 || n >= mGeometries.size() )
{
return nullptr;
}
return mGeometries.at( n );
return mGeometries.value( n );
}

bool QgsGeometryCollectionV2::addGeometry( QgsAbstractGeometryV2* g )

0 comments on commit b319435

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