Skip to content
Permalink
Browse files
use array delete operator on geometry
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9207 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 29, 2008
1 parent 6eb7eb3 commit ed79d12f5dc0980d656547ae5ad3df4e3339ea20
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/core/qgsgeometry.cpp
@@ -74,6 +74,8 @@ void throwGEOSException( const char *fmt, ... )
vsnprintf( msg, buflen + 1, fmt, ap );
va_end( ap );

QgsDebugMsg( QString( "GEOS exception encountered: " ).arg( msg ) );

throw GEOSException( msg );
}

@@ -628,7 +630,7 @@ void QgsGeometry::setGeos( GEOSGeometry* geos )
}
if ( mGeometry )
{
delete mGeometry;
delete [] mGeometry;
mGeometry = 0;
}

@@ -1756,7 +1758,7 @@ bool QgsGeometry::deleteVertexAt( int atVertex )
}
if ( success )
{
delete mGeometry;
delete [] mGeometry;
mGeometry = newbuffer;
mGeometrySize -= ( 2 * sizeof( double ) );
if ( hasZValue )
@@ -2060,7 +2062,7 @@ bool QgsGeometry::insertVertexBefore( double x, double y, int beforeVertex )

if ( success )
{
delete mGeometry;
delete [] mGeometry;
mGeometry = newbuffer;
mGeometrySize += 2 * sizeof( double );
if ( hasZValue )
@@ -4531,7 +4533,7 @@ bool QgsGeometry::convertToMultiType()
//copy the existing single geometry
memcpy( &newGeometry[currentWkbPosition], mGeometry, mGeometrySize );

delete mGeometry;
delete [] mGeometry;
mGeometry = newGeometry;
mGeometrySize = newGeomSize;
mDirtyGeos = true;

0 comments on commit ed79d12

Please sign in to comment.