Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Avoid iterating over temporary container
- Loading branch information
Showing
with
3 additions
and
2 deletions.
-
+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 ) |
|
|
{ |
|
|