Skip to content
Permalink
Browse files

Fix some minor coverity warnings

  • Loading branch information
nyalldawson committed Apr 3, 2016
1 parent b8b12d8 commit 883016f4714d8e27bd6646789a1e3eed4017cf82
@@ -477,7 +477,7 @@ bool QgsAlignRaster::createAndWarp( const Item& raster )
psWarpOptions->panDstBands[i] = i + 1;
}

psWarpOptions->eResampleAlg = ( GDALResampleAlg ) raster.resampleMethod;
psWarpOptions->eResampleAlg = static_cast< GDALResampleAlg >( raster.resampleMethod );

// our progress function
psWarpOptions->pfnProgress = _progress;
@@ -101,7 +101,7 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()
// duplicate layer
QAction* duplicateLayersAction = menu->addAction( QgsApplication::getThemeIcon( "/mActionDuplicateLayer.svg" ), tr( "&Duplicate" ), QgisApp::instance(), SLOT( duplicateLayers() ) );

if ( layer->isSpatial() )
if ( layer && layer->isSpatial() )
{
// set layer scale visibility
menu->addAction( tr( "&Set Layer Scale Visibility" ), QgisApp::instance(), SLOT( setLayerScaleVisibility() ) );
@@ -372,7 +372,7 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e )
if (( item->type() == QgsComposerItem::ComposerPolygon
|| item->type() == QgsComposerItem::ComposerPolyline ) )
{
QgsComposerNodesItem* itemP = dynamic_cast<QgsComposerNodesItem *>( item );
QgsComposerNodesItem* itemP = static_cast<QgsComposerNodesItem *>( item );
int index = itemP->nodeAtPosition( scenePoint );
if ( index != -1 )
{

0 comments on commit 883016f

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