@@ -451,9 +451,9 @@ int QgsDecorationGrid::xGridLines( const QgsMapSettings &mapSettings, QList< QPa
451
451
if ( mGridIntervalY / mapSettings.mapUnitsPerPixel () < 1 )
452
452
return 1 ;
453
453
454
- const QPolygonF & canvasPoly = canvasPolygon ( mapSettings );
455
- const QPolygonF & mapPolygon = canvasExtent ( mapSettings );
456
- const QRectF & mapBoundingRect = mapPolygon.boundingRect ();
454
+ const QPolygonF canvasPoly = canvasPolygon ( mapSettings );
455
+ const QPolygonF mapPolygon = canvasExtent ( mapSettings );
456
+ const QRectF mapBoundingRect = mapPolygon.boundingRect ();
457
457
const QLineF lineEast ( mapPolygon[2 ], mapPolygon[1 ] );
458
458
const QLineF lineWest ( mapPolygon[3 ], mapPolygon[0 ] );
459
459
@@ -496,15 +496,15 @@ int QgsDecorationGrid::yGridLines( const QgsMapSettings &mapSettings, QList< QPa
496
496
if ( mGridIntervalX / mapSettings.mapUnitsPerPixel () < 1 )
497
497
return 1 ;
498
498
499
- const QPolygonF & canvasPoly = canvasPolygon ( mapSettings );
500
- const QPolygonF & mapPolygon = canvasExtent ( mapSettings );
499
+ const QPolygonF canvasPoly = canvasPolygon ( mapSettings );
500
+ const QPolygonF mapPolygon = canvasExtent ( mapSettings );
501
501
const QLineF lineSouth ( mapPolygon[3 ], mapPolygon[2 ] );
502
502
const QLineF lineNorth ( mapPolygon[0 ], mapPolygon[1 ] );
503
503
504
504
const double len = lineSouth.length ();
505
505
Q_ASSERT ( std::fabs ( len - lineNorth.length () ) < 1e-6 ); // no shear
506
506
507
- const QRectF & mapBoundingRect = mapPolygon.boundingRect ();
507
+ const QRectF mapBoundingRect = mapPolygon.boundingRect ();
508
508
const double roundCorrection = mapBoundingRect.left () > 0 ? 1.0 : 0.0 ;
509
509
double dist = static_cast < int >( ( mapBoundingRect.left () - mGridOffsetX ) / mGridIntervalX + roundCorrection ) * mGridIntervalX + mGridOffsetX ;
510
510
dist = dist - mapBoundingRect.left ();
0 commit comments