Skip to content

Commit c23e96d

Browse files
committedSep 14, 2016
fix windows build
1 parent 3f3e206 commit c23e96d

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
@@ -506,7 +506,7 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, in
506506
static bool _fuzzyContainsRect( const QRectF& r1, const QRectF& r2 )
507507
{
508508
double significantDigits = log10( qMax( r1.width(), r1.height() ) );
509-
double epsilon = pow( 10, ( significantDigits - 5 ) ); // floats have 6-9 significant digits
509+
double epsilon = pow( 10.0, significantDigits - 5 ); // floats have 6-9 significant digits
510510
return r1.contains( r2.adjusted( epsilon, epsilon, -epsilon, -epsilon ) );
511511
}
512512

@@ -1190,10 +1190,8 @@ void QgsWmsProvider::setupXyzCapabilities( const QString &uri )
11901190
QgsWmtsTileMatrix tm;
11911191
tm.identifier = QString::number( zoom );
11921192
tm.topLeft = topLeft;
1193-
tm.tileWidth = 256;
1194-
tm.tileHeight = 256;
1195-
tm.matrixWidth = pow( 2, zoom );
1196-
tm.matrixHeight = pow( 2, zoom );
1193+
tm.tileWidth = tm.tileHeight = 256;
1194+
tm.matrixWidth = tm.matrixHeight = 1 << zoom;
11971195
tm.tres = xspan / ( tm.tileWidth * tm.matrixWidth );
11981196

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

0 commit comments

Comments
 (0)
Please sign in to comment.