Skip to content

Commit ac193d0

Browse files
committed
Fix clang/clazy warnings
1 parent dfa5104 commit ac193d0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/app/qgisapp.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3695,7 +3695,7 @@ void QgisApp::setupDockWidget( QDockWidget *dockWidget, bool isFloating, const Q
36953695
if ( dockGeometry.isEmpty() )
36963696
{
36973697
// try to guess a nice initial placement for view - about 3/4 along, half way down
3698-
dockWidget->setGeometry( QRect( rect().width() * 0.75, rect().height() * 0.5, 400, 400 ) );
3698+
dockWidget->setGeometry( QRect( static_cast< int >( rect().width() * 0.75 ), static_cast< int >( rect().height() * 0.5 ), 400, 400 ) );
36993699
addDockWidget( area, dockWidget );
37003700
}
37013701
else
@@ -10902,8 +10902,8 @@ void QgisApp::new3DMapCanvas()
1090210902
dock->setMapSettings( map );
1090310903

1090410904
QgsRectangle extent = mMapCanvas->extent();
10905-
float dist = std::max( extent.width(), extent.height() );
10906-
dock->mapCanvas3D()->setViewFromTop( mMapCanvas->extent().center(), dist, mMapCanvas->rotation() );
10905+
float dist = static_cast< float >( std::max( extent.width(), extent.height() ) );
10906+
dock->mapCanvas3D()->setViewFromTop( mMapCanvas->extent().center(), dist, static_cast< float >( mMapCanvas->rotation() ) );
1090710907
}
1090810908
#endif
1090910909
}
@@ -11815,7 +11815,8 @@ void QgisApp::markDirty()
1181511815
void QgisApp::extentChanged()
1181611816
{
1181711817
// allow symbols in the legend update their preview if they use map units
11818-
mLayerTreeView->layerTreeModel()->setLegendMapViewData( mMapCanvas->mapUnitsPerPixel(), mMapCanvas->mapSettings().outputDpi(), mMapCanvas->scale() );
11818+
mLayerTreeView->layerTreeModel()->setLegendMapViewData( mMapCanvas->mapUnitsPerPixel(),
11819+
static_cast< int >( std::round( mMapCanvas->mapSettings().outputDpi() ) ), mMapCanvas->scale() );
1181911820
}
1182011821

1182111822
void QgisApp::layersWereAdded( const QList<QgsMapLayer *> &layers )
@@ -11880,7 +11881,7 @@ void QgisApp::showStatusMessage( const QString &message )
1188011881

1188111882
void QgisApp::loadingLayerMessages( const QString &layerName, const QList<QgsReadWriteContext::ReadWriteMessage> &messages )
1188211883
{
11883-
for ( const auto message : messages )
11884+
for ( const auto &message : messages )
1188411885
{
1188511886
messageBar()->pushMessage( layerName, message.message(), message.categories().join( '\n' ), message.level() );
1188611887
}

0 commit comments

Comments
 (0)