From 95a6fcdd26c93ebea2726c43f8afdf04b4245830 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Mon, 11 Jun 2018 12:23:13 +0300 Subject: [qt] Fix asMapboxGLFeatureIdentifier iterator traversal --- platform/qt/src/qt_geojson.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/platform/qt/src/qt_geojson.cpp b/platform/qt/src/qt_geojson.cpp index 80377de64d..9d0a3e96eb 100644 --- a/platform/qt/src/qt_geojson.cpp +++ b/platform/qt/src/qt_geojson.cpp @@ -72,10 +72,8 @@ mbgl::Value asMapboxGLPropertyValue(const QVariant &value) { auto valueMap = [](const QVariantMap &map) { std::unordered_map mbglMap; mbglMap.reserve(map.size()); - auto it = map.constBegin(); - while (it != map.constEnd()) { + for (auto it = map.constBegin(); it != map.constEnd(); ++it) { mbglMap.emplace(std::make_pair(it.key().toStdString(), asMapboxGLPropertyValue(it.value()))); - ++it; } return mbglMap; }; @@ -132,8 +130,7 @@ mbgl::FeatureIdentifier asMapboxGLFeatureIdentifier(const QVariant &id) { mbgl::Feature asMapboxGLFeature(const QMapbox::Feature &feature) { mbgl::PropertyMap properties; properties.reserve(feature.properties.size()); - auto it = feature.properties.constBegin(); - while (it != feature.properties.constEnd()) { + for (auto it = feature.properties.constBegin(); it != feature.properties.constEnd(); ++it) { properties.emplace(std::make_pair(it.key().toStdString(), asMapboxGLPropertyValue(it.value()))); } -- cgit v1.2.1