Skip to content

Commit 7019a8c

Browse files
committedOct 30, 2015
fix windows build (followup 8993a4b)
1 parent 8993a4b commit 7019a8c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎src/core/qgscoordinatetransform.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle &r
539539
// even with 1000 points it takes < 1ms
540540
// TODO: how to effectively and precisely reproject bounding box?
541541
const int nPoints = 1000;
542-
double d = sqrt(( rect.width() * rect.height() ) / pow( sqrt( nPoints ) - 1, 2.0 ) );
542+
double d = sqrt(( rect.width() * rect.height() ) / pow( sqrt(( double ) nPoints ) - 1, 2.0 ) );
543543
int nXPoints = ( int ) ceil( rect.width() / d ) + 1;
544544
int nYPoints = ( int ) ceil( rect.height() / d ) + 1;
545545

@@ -549,9 +549,9 @@ QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle &r
549549
// We're interfacing with C-style vectors in the
550550
// end, so let's do C-style vectors here too.
551551

552-
double x[nXPoints * nYPoints];
553-
double y[nXPoints * nYPoints];
554-
double z[nXPoints * nYPoints];
552+
QVector<double> x( nXPoints * nYPoints );
553+
QVector<double> y( nXPoints * nYPoints );
554+
QVector<double> z( nXPoints * nYPoints );
555555

556556
QgsDebugMsg( "Entering transformBoundingBox..." );
557557

@@ -584,7 +584,7 @@ QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle &r
584584
// be handled in above layers.
585585
try
586586
{
587-
transformCoords( nXPoints * nYPoints, x, y, z, direction );
587+
transformCoords( nXPoints * nYPoints, x.data(), y.data(), z.data(), direction );
588588
}
589589
catch ( const QgsCsException & )
590590
{

0 commit comments

Comments
 (0)
Please sign in to comment.