Navigation Menu

Skip to content

Commit

Permalink
Const copy in for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Apr 4, 2019
1 parent a8ffb33 commit 258b9a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/server/services/wms/qgswmsrendercontext.cpp
Expand Up @@ -366,7 +366,8 @@ void QgsWmsRenderContext::searchLayersToRender()

if ( mFlags & AddQueryLayers )
{
for ( const QString &layer : flattenedQueryLayers() )
const auto constLayers { flattenedQueryLayers() };
for ( const QString &layer : constLayers )
{
if ( mNicknameLayers.contains( layer )
&& !mLayersToRender.contains( mNicknameLayers[layer] ) )
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsrendercontext.h
Expand Up @@ -194,7 +194,7 @@ namespace QgsWms
#endif

/**
* Returns a map having layer group names as keys and a list of layer instances as values.
* Returns a map having layer group names as keys and a list of layers as values.
* \since QGIS 3.8
*/
QMap<QString, QList<QgsMapLayer *> > layerGroups() const;
Expand Down

0 comments on commit 258b9a5

Please sign in to comment.