Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update src/providers/wms/qgswmscapabilities.cpp
Use for-iterator

Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
  • Loading branch information
mhugent and m-kuhn committed Nov 17, 2020
1 parent d2e953e commit d832f8d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/providers/wms/qgswmscapabilities.cpp
Expand Up @@ -142,15 +142,14 @@ bool QgsWmsSettings::parseUri( const QString &uriString )
if ( uri.hasParam( QStringLiteral( "opacities" ) ) )
{
mOpacities.clear();
QStringList opacities = uri.params( QStringLiteral( "opacities" ) );
QStringList::const_iterator oIt = opacities.constBegin();
for ( ; oIt != opacities.constEnd(); ++oIt )
const QStringList opacities = uri.params( QStringLiteral( "opacities" ) );
for ( const QString &opacity : opacities )
{
bool ok = false;
oIt->toInt( &ok );
opacity.toInt( &ok );
if ( ok )
{
mOpacities.append( *oIt );
mOpacities.append( opacity );
}
else
{
Expand Down

0 comments on commit d832f8d

Please sign in to comment.