Skip to content

Commit

Permalink
More consts
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Sep 13, 2021
1 parent 7edf3c5 commit b76ac5b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/vectortile/qgsmapboxglstyleconverter.cpp
Expand Up @@ -2003,7 +2003,7 @@ QgsProperty QgsMapBoxGlStyleConverter::parseInterpolateColorByZoom( const QVaria
return QgsProperty();

QString caseString = QStringLiteral( "CASE " );
QString colorComponent( "color_part(%1,'%2')" );
const QString colorComponent( "color_part(%1,'%2')" );

for ( int i = 0; i < stops.length() - 1; ++i )
{
Expand Down Expand Up @@ -2039,8 +2039,8 @@ QgsProperty QgsMapBoxGlStyleConverter::parseInterpolateColorByZoom( const QVaria
}
else
{
QString bottomColorExpr = parseColorExpression( bcVariant, context );
QString topColorExpr = parseColorExpression( tcVariant, context );
const QString bottomColorExpr = parseColorExpression( bcVariant, context );
const QString topColorExpr = parseColorExpression( tcVariant, context );

caseString += QStringLiteral( "WHEN @vector_tile_zoom >= %1 AND @vector_tile_zoom < %2 THEN color_hsla("
"%3, %4, %5, %6) " ).arg( bz, tz,
Expand All @@ -2067,7 +2067,7 @@ QgsProperty QgsMapBoxGlStyleConverter::parseInterpolateColorByZoom( const QVaria
}
else
{
QString topColorExpr = parseColorExpression( tcVariant, context );
const QString topColorExpr = parseColorExpression( tcVariant, context );

caseString += QStringLiteral( "WHEN @vector_tile_zoom >= %1 THEN color_hsla(%2, %3, %4, %5) "
"ELSE color_hsla(%2, %3, %4, %5) END" ).arg( tz )
Expand Down Expand Up @@ -2519,9 +2519,9 @@ QString QgsMapBoxGlStyleConverter::interpolateExpression( double zoomMin, double
if ( valueMin.canConvert( QMetaType::Double ) && valueMax.canConvert( QMetaType::Double ) )
{
bool minDoubleOk = true;
double min = valueMin.toDouble( &minDoubleOk );
const double min = valueMin.toDouble( &minDoubleOk );
bool maxDoubleOk = true;
double max = valueMax.toDouble( &maxDoubleOk );
const double max = valueMax.toDouble( &maxDoubleOk );
if ( minDoubleOk && maxDoubleOk && qgsDoubleNear( min, max ) )
{
return QString::number( min * multiplier );
Expand Down

0 comments on commit b76ac5b

Please sign in to comment.