Skip to content
Permalink
Browse files
Followup c14352f, tweaked Coverity fixes
  • Loading branch information
nyalldawson committed Nov 29, 2015
1 parent 65b6171 commit 052fd79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
@@ -319,8 +319,6 @@ QgsGeometry* QgsVectorLayerLabelProvider::getPointObstacleGeometry( QgsFeature&
QgsAbstractGeometryV2* obstacleGeom = 0;
if ( isMultiPoint )
obstacleGeom = new QgsMultiPolygonV2();
else
obstacleGeom = new QgsPolygonV2();

// for each point
for ( int i = 0; i < fet.constGeometry()->geometry()->nCoordinates(); ++i )
@@ -380,7 +378,6 @@ QgsGeometry* QgsVectorLayerLabelProvider::getPointObstacleGeometry( QgsFeature&
}
else
{
delete obstacleGeom;
obstacleGeom = obstaclePolygon;
}
}
@@ -60,6 +60,7 @@ QgsRelationReferenceWidget::QgsRelationReferenceWidget( QWidget* parent )
, mMessageBar( NULL )
, mForeignKey( QVariant() )
, mReferencedFieldIdx( -1 )
, mReferencingFieldIdx( -1 )
, mAllowNull( true )
, mHighlight( NULL )
, mMapTool( NULL )
@@ -496,6 +496,7 @@ void TestQgsGeometry::pointV2()
QCOMPARE( size, p12.wkbSize() );
QgsPointV2 p13;
p13.fromWkb( wkb );
delete[] wkb;
wkb = 0;
QVERIFY( p13 == p12 );

@@ -507,6 +508,7 @@ void TestQgsGeometry::pointV2()
p13 = QgsPointV2( 1, 2 );
wkb = line.asWkb( size );
QVERIFY( !p13.fromWkb( wkb ) );
delete[] wkb;
wkb = 0;
QCOMPARE( p13.wkbType(), QgsWKBTypes::Unknown );

@@ -1192,7 +1194,7 @@ void TestQgsGeometry::lineStringV2()
QCOMPARE( size, l15.wkbSize() );
QgsLineStringV2 l16;
l16.fromWkb( wkb );
delete wkb;
delete[] wkb;
wkb = 0;
QCOMPARE( l16.numPoints(), 4 );
QCOMPARE( l16.vertexCount(), 4 );
@@ -1214,7 +1216,7 @@ void TestQgsGeometry::lineStringV2()
QgsPointV2 point( 1, 2 );
wkb = point.asWkb( size ) ;
QVERIFY( !l16.fromWkb( wkb ) );
delete wkb;
delete[] wkb;
wkb = 0;
QCOMPARE( l16.wkbType(), QgsWKBTypes::Unknown );

@@ -1867,7 +1869,7 @@ void TestQgsGeometry::lineStringV2()
l37.setPoints( QList< QgsPointV2 >() << QgsPointV2( 5, 10 ) << QgsPointV2( 10, 15 ) );
wkb = toAppend->asWkb( size );
l37.fromWkb( wkb );
delete wkb;
delete[] wkb;
wkb = 0;
QCOMPARE( l37.boundingBox(), QgsRectangle( 1, 0, 4, 2 ) );
l37.fromWkt( QString( "LineString( 1 5, 3 4, 6 3 )" ) );

0 comments on commit 052fd79

Please sign in to comment.