summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-09-06 14:32:26 (GMT)
committerBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-09-06 15:51:49 (GMT)
commit3eae87c251a65bce7a88e3b601ee776e17cdd903 (patch)
tree7b12a97be116c9ecf56902b7d00d714aeffcd717
parent981a59aa12df9acb3d18bc10b450e7431d42122b (diff)
use foreach
-rw-r--r--src/plugins/runner/osm/OsmRelation.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/runner/osm/OsmRelation.cpp b/src/plugins/runner/osm/OsmRelation.cpp
index d9a83ec..7fd63f6 100644
--- a/src/plugins/runner/osm/OsmRelation.cpp
+++ b/src/plugins/runner/osm/OsmRelation.cpp
@@ -72,14 +72,13 @@ void OsmRelation::create(GeoDataDocument *document, OsmWays &ways, const OsmNode
GeoDataFeature::GeoDataVisualCategory outerCategory = StyleBuilder::determineVisualCategory(m_osmData);
if (outerCategory == GeoDataFeature::None) {
// Try to determine the visual category from the relation members
- auto iterator = outerWays.begin();
GeoDataFeature::GeoDataVisualCategory const firstCategory =
- StyleBuilder::determineVisualCategory(ways[*iterator].osmData());
+ StyleBuilder::determineVisualCategory(ways[*outerWays.begin()].osmData());
bool categoriesAreSame = true;
- for( ; iterator != outerWays.end(); ++iterator ) {
+ foreach (auto wayId, outerWays) {
GeoDataFeature::GeoDataVisualCategory const category =
- StyleBuilder::determineVisualCategory(ways[*iterator].osmData());
+ StyleBuilder::determineVisualCategory(ways[wayId].osmData());
if( category != firstCategory ) {
categoriesAreSame = false;
break;