Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid iterating over temporary container
  • Loading branch information
nyalldawson committed May 15, 2016
1 parent a3d6227 commit 63cab56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/gps_importer/qgsgpsplugin.cpp
Expand Up @@ -124,8 +124,9 @@ void QgsGPSPlugin::run()
std::vector<QgsVectorLayer*> gpxLayers;
QMap<QString, QgsMapLayer*>::const_iterator iter;
QgsMapLayerRegistry* registry = QgsMapLayerRegistry::instance();
for ( iter = registry->mapLayers().begin();
iter != registry->mapLayers().end(); ++iter )
QMap<QString, QgsMapLayer*> layers = registry->mapLayers();
for ( iter = layers.constBegin();
iter != layers.constEnd(); ++iter )
{
if ( iter.value()->type() == QgsMapLayer::VectorLayer )
{
Expand Down

0 comments on commit 63cab56

Please sign in to comment.