Skip to content
Permalink
Browse files

Minor coverity fixes

  • Loading branch information
nyalldawson committed Jul 7, 2015
1 parent 091cd89 commit 12a81d9d8654fbd3f728ad145b96e8d7f3a719ae
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/core/geometry/qgsgeometryeditutils.cpp
  2. +3 −3 src/core/symbology-ng/qgsrendererv2.cpp
@@ -130,7 +130,7 @@ int QgsGeometryEditUtils::addPart( QgsAbstractGeometryV2* geom, QgsAbstractGeome
}
else if ( part->geometryType() == "MultiPolygon" )
{
QgsGeometryCollectionV2 *parts = dynamic_cast<QgsGeometryCollectionV2*>( part );
QgsGeometryCollectionV2 *parts = static_cast<QgsGeometryCollectionV2*>( part );

int i;
int n = geomCollection->numGeometries();
@@ -46,7 +46,7 @@ const unsigned char* QgsFeatureRendererV2::_getPoint( QPointF& pt, QgsRenderCont
unsigned int wkbType;
wkbPtr >> wkbType >> pt.rx() >> pt.ry();

if ( wkbType == QGis::WKBPoint25D || wkbType == QgsWKBTypes::PointZ )
if (( QgsWKBTypes::Type )wkbType == QgsWKBTypes::Point25D || ( QgsWKBTypes::Type )wkbType == QgsWKBTypes::PointZ )
wkbPtr += sizeof( double );

if ( context.coordinateTransform() )
@@ -66,7 +66,7 @@ const unsigned char* QgsFeatureRendererV2::_getLineString( QPolygonF& pts, QgsRe
unsigned int wkbType, nPoints;
wkbPtr >> wkbType >> nPoints;

bool hasZValue = wkbType == QGis::WKBLineString25D || wkbType == QgsWKBTypes::LineStringZ;
bool hasZValue = (( QgsWKBTypes::Type )wkbType == QgsWKBTypes::LineString25D ) || (( QgsWKBTypes::Type )wkbType == QgsWKBTypes::LineStringZ );

double x = 0.0;
double y = 0.0;
@@ -121,7 +121,7 @@ const unsigned char* QgsFeatureRendererV2::_getPolygon( QPolygonF& pts, QList<QP
if ( numRings == 0 ) // sanity check for zero rings in polygon
return wkbPtr;

bool hasZValue = wkbType == QGis::WKBPolygon25D || wkbType == QgsWKBTypes::PolygonZ;
bool hasZValue = (( QgsWKBTypes::Type )wkbType == QgsWKBTypes::Polygon25D ) || (( QgsWKBTypes::Type )wkbType == QgsWKBTypes::PolygonZ );

double x, y;
holes.clear();

0 comments on commit 12a81d9

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