Skip to content

Commit

Permalink
Some consting
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 7, 2019
1 parent 05da49a commit b639cdf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/core/symbology/qgssymbol.cpp
Expand Up @@ -1342,8 +1342,7 @@ void QgsMarkerSymbol::setAngle( double symbolAngle )

double QgsMarkerSymbol::angle() const
{
const auto constMLayers = mLayers;
for ( QgsSymbolLayer *layer : constMLayers )
for ( QgsSymbolLayer *layer : qgis::as_const( mLayers ) )
{
if ( layer->type() != QgsSymbol::Marker )
continue;
Expand All @@ -1369,8 +1368,8 @@ void QgsMarkerSymbol::setDataDefinedAngle( const QgsProperty &property )
{
const double symbolRotation = angle();

const auto constMLayers = mLayers;
for ( QgsSymbolLayer *layer : constMLayers )

for ( QgsSymbolLayer *layer : qgis::as_const( mLayers ) )
{
if ( layer->type() != QgsSymbol::Marker )
continue;
Expand Down Expand Up @@ -1725,8 +1724,8 @@ void QgsMarkerSymbol::renderPoint( QPointF point, const QgsFeature *f, QgsRender
return;
}

const auto constMLayers = mLayers;
for ( QgsSymbolLayer *symbolLayer : constMLayers )

for ( QgsSymbolLayer *symbolLayer : qgis::as_const( mLayers ) )
{
if ( context.renderingStopped() )
break;
Expand Down

0 comments on commit b639cdf

Please sign in to comment.