@@ -539,7 +539,7 @@ QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle &r
539
539
// even with 1000 points it takes < 1ms
540
540
// TODO: how to effectively and precisely reproject bounding box?
541
541
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 ) );
543
543
int nXPoints = ( int ) ceil ( rect.width () / d ) + 1 ;
544
544
int nYPoints = ( int ) ceil ( rect.height () / d ) + 1 ;
545
545
@@ -549,9 +549,9 @@ QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle &r
549
549
// We're interfacing with C-style vectors in the
550
550
// end, so let's do C-style vectors here too.
551
551
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 ) ;
555
555
556
556
QgsDebugMsg ( " Entering transformBoundingBox..." );
557
557
@@ -584,7 +584,7 @@ QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle &r
584
584
// be handled in above layers.
585
585
try
586
586
{
587
- transformCoords ( nXPoints * nYPoints, x, y, z, direction );
587
+ transformCoords ( nXPoints * nYPoints, x. data () , y. data () , z. data () , direction );
588
588
}
589
589
catch ( const QgsCsException & )
590
590
{
0 commit comments