Skip to content

Commit

Permalink
size_t and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored and nyalldawson committed Jan 8, 2022
1 parent 0814855 commit f3224fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -1009,7 +1009,7 @@ bool QgsWmsProvider::readBlock( int bandNo, QgsRectangle const &viewExtent, int
}

QgsDebugMsgLevel( QStringLiteral( "image height = %1 bytesPerLine = %2" ).arg( image->height() ) . arg( image->bytesPerLine() ), 3 );
size_t pixelsCount = pixelWidth * pixelHeight;
size_t pixelsCount = static_cast<size_t>( pixelWidth ) * pixelHeight;
size_t myExpectedSize = pixelsCount * 4;
size_t myImageSize = image->height() * image->bytesPerLine();
if ( myExpectedSize != myImageSize ) // should not happen
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmsprovider.h
Expand Up @@ -275,7 +275,7 @@ class QgsWmsProvider final: public QgsRasterDataProvider
QList< double > nativeResolutions() const override;
QgsLayerMetadata layerMetadata() const override;

// Statitics could be available if the provider has a converter from colors to other value type, the returned statistics depend on the converter
// Statistics could be available if the provider has a converter from colors to other value type, the returned statistics depend on the converter
QgsRasterBandStats bandStatistics( int bandNo,
int stats = QgsRasterBandStats::All,
const QgsRectangle &extent = QgsRectangle(),
Expand Down

0 comments on commit f3224fb

Please sign in to comment.