Skip to content

Commit

Permalink
Fix clang/clazy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 14, 2018
1 parent bef88f3 commit 0fc1c9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/qgsmaptoolidentify.cpp
Expand Up @@ -224,7 +224,7 @@ bool QgsMapToolIdentify::identifyVectorLayer( QList<QgsMapToolIdentify::Identify

if ( !layer->isInScaleRange( mCanvas->mapSettings().scale() ) )
{
QgsDebugMsg( "Out of scale limits" );
QgsDebugMsg( QStringLiteral( "Out of scale limits" ) );
return false;
}

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

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

0 comments on commit 0fc1c9d

Please sign in to comment.