Skip to content

Commit

Permalink
Minor coverity fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 7, 2015
1 parent 091cd89 commit 12a81d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometryeditutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions src/core/symbology-ng/qgsrendererv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand All @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 12a81d9

Please sign in to comment.