Skip to content

Commit

Permalink
Fix some minor coverity warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 3, 2016
1 parent b8b12d8 commit 883016f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/analysis/raster/qgsalignraster.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -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() ) );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgscomposerview.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 883016f

Please sign in to comment.