Skip to content
Permalink
Browse files

Avoid iterating over temporary container

  • Loading branch information
nyalldawson committed May 13, 2016
1 parent a3d6227 commit 63cab56839d6795451223150d8102e4e056ab8b1
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/plugins/gps_importer/qgsgpsplugin.cpp
@@ -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 )
{

0 comments on commit 63cab56

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