summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Seelenbinder <me@lukeseelenbinder.com>2020-04-17 12:29:40 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-04-17 16:50:11 +0300
commitefe604c3920d6383c572f908fc0d0420551b703a (patch)
tree2c2d4815b27868136d79c87bdd40d6d23abebd64
parent40cfb77b7d3b7c51999290f28f0b4735fa086976 (diff)
downloadqtlocation-mapboxgl-efe604c3920d6383c572f908fc0d0420551b703a.tar.gz
Better structure fix.
-rw-r--r--src/mbgl/layout/symbol_layout.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp
index c1eb495838..68aa8f5c7d 100644
--- a/src/mbgl/layout/symbol_layout.cpp
+++ b/src/mbgl/layout/symbol_layout.cpp
@@ -696,10 +696,10 @@ void SymbolLayout::addFeature(const std::size_t layoutFeatureIndex,
} else if (type == FeatureType::LineString) {
for (const auto& line : feature.geometry) {
// Skip invalid LineStrings.
- if (line.size() > 0) {
- Anchor anchor(line[0].x, line[0].y, 0, minScale);
- addSymbolInstance(anchor, createSymbolInstanceSharedData(line));
- }
+ if (line.empty()) continue;
+
+ Anchor anchor(line[0].x, line[0].y, 0, minScale);
+ addSymbolInstance(anchor, createSymbolInstanceSharedData(line));
}
} else if (type == FeatureType::Point) {
for (const auto& points : feature.geometry) {