Skip to content

Commit cef3b16

Browse files
committed
Fix clang/clazy warnings
(cherry-picked from 0fc1c9d)
1 parent 885ea99 commit cef3b16

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/gui/qgsmaptoolidentify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ bool QgsMapToolIdentify::identifyVectorLayer( QList<QgsMapToolIdentify::Identify
224224

225225
if ( !layer->isInScaleRange( mCanvas->mapSettings().scale() ) )
226226
{
227-
QgsDebugMsg( "Out of scale limits" );
227+
QgsDebugMsg( QStringLiteral( "Out of scale limits" ) );
228228
return false;
229229
}
230230

@@ -620,8 +620,8 @@ bool QgsMapToolIdentify::identifyRasterLayer( QList<IdentifyResult> *results, Qg
620620
// are similar to source width and height used to reproject layer for drawing.
621621
// TODO: may be very dangerous, because it may result in different resolutions
622622
// in source CRS, and WMS server (QGIS server) calcs wrong coor using average resolution.
623-
int width = std::round( viewExtent.width() / mapUnitsPerPixel );
624-
int height = std::round( viewExtent.height() / mapUnitsPerPixel );
623+
int width = static_cast< int >( std::round( viewExtent.width() / mapUnitsPerPixel ) );
624+
int height = static_cast< int >( std::round( viewExtent.height() / mapUnitsPerPixel ) );
625625

626626
QgsDebugMsg( QStringLiteral( "viewExtent.width = %1 viewExtent.height = %2" ).arg( viewExtent.width() ).arg( viewExtent.height() ) );
627627
QgsDebugMsg( QStringLiteral( "width = %1 height = %2" ).arg( width ).arg( height ) );
@@ -695,7 +695,7 @@ bool QgsMapToolIdentify::identifyRasterLayer( QList<IdentifyResult> *results, Qg
695695
for ( const QgsFeatureStore &featureStore : featureStoreList )
696696
{
697697
const QgsFeatureList storeFeatures = featureStore.features();
698-
for ( QgsFeature feature : storeFeatures )
698+
for ( const QgsFeature &feature : storeFeatures )
699699
{
700700
attributes.clear();
701701
// WMS sublayer and feature type, a sublayer may contain multiple feature types.

0 commit comments

Comments
 (0)