Skip to content
Permalink
Browse files

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 d832f8d641b122c9164abc89d41354e44f1c4dd4
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/providers/wms/qgswmscapabilities.cpp
@@ -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
{

0 comments on commit d832f8d

Please sign in to comment.
You can’t perform that action at this time.