Skip to content

Commit 883016f

Browse files
committed
Fix some minor coverity warnings
1 parent b8b12d8 commit 883016f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/analysis/raster/qgsalignraster.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ bool QgsAlignRaster::createAndWarp( const Item& raster )
477477
psWarpOptions->panDstBands[i] = i + 1;
478478
}
479479

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

482482
// our progress function
483483
psWarpOptions->pfnProgress = _progress;

src/app/qgsapplayertreeviewmenuprovider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()
101101
// duplicate layer
102102
QAction* duplicateLayersAction = menu->addAction( QgsApplication::getThemeIcon( "/mActionDuplicateLayer.svg" ), tr( "&Duplicate" ), QgisApp::instance(), SLOT( duplicateLayers() ) );
103103

104-
if ( layer->isSpatial() )
104+
if ( layer && layer->isSpatial() )
105105
{
106106
// set layer scale visibility
107107
menu->addAction( tr( "&Set Layer Scale Visibility" ), QgisApp::instance(), SLOT( setLayerScaleVisibility() ) );

src/gui/qgscomposerview.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e )
372372
if (( item->type() == QgsComposerItem::ComposerPolygon
373373
|| item->type() == QgsComposerItem::ComposerPolyline ) )
374374
{
375-
QgsComposerNodesItem* itemP = dynamic_cast<QgsComposerNodesItem *>( item );
375+
QgsComposerNodesItem* itemP = static_cast<QgsComposerNodesItem *>( item );
376376
int index = itemP->nodeAtPosition( scenePoint );
377377
if ( index != -1 )
378378
{

0 commit comments

Comments
 (0)