Skip to content

Commit 11caf0a

Browse files
committed
fix windows build
(cherry picked from commit c23e96d)
1 parent f5b657d commit 11caf0a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/providers/wms/qgswmsprovider.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, in
505505
static bool _fuzzyContainsRect( const QRectF& r1, const QRectF& r2 )
506506
{
507507
double significantDigits = log10( qMax( r1.width(), r1.height() ) );
508-
double epsilon = pow( 10, ( significantDigits - 5 ) ); // floats have 6-9 significant digits
508+
double epsilon = pow( 10.0, significantDigits - 5 ); // floats have 6-9 significant digits
509509
return r1.contains( r2.adjusted( epsilon, epsilon, -epsilon, -epsilon ) );
510510
}
511511

@@ -1188,10 +1188,8 @@ void QgsWmsProvider::setupXyzCapabilities( const QString &uri )
11881188
QgsWmtsTileMatrix tm;
11891189
tm.identifier = QString::number( zoom );
11901190
tm.topLeft = topLeft;
1191-
tm.tileWidth = 256;
1192-
tm.tileHeight = 256;
1193-
tm.matrixWidth = pow( 2, zoom );
1194-
tm.matrixHeight = pow( 2, zoom );
1191+
tm.tileWidth = tm.tileHeight = 256;
1192+
tm.matrixWidth = tm.matrixHeight = 1 << zoom;
11951193
tm.tres = xspan / ( tm.tileWidth * tm.matrixWidth );
11961194

11971195
mCaps.mTileMatrixSets[tms.identifier].tileMatrices[tm.tres] = tm;

0 commit comments

Comments
 (0)