summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation/shape_annotation_impl.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-06-20 11:40:56 -0700
committerKonstantin Käfer <mail@kkaefer.com>2017-06-21 17:18:08 -0700
commit4ea47151796cb885fbcb2dd3803aa3f7132467bb (patch)
tree3c10360ed2da83e4e912576560ba2841b0af9597 /src/mbgl/annotation/shape_annotation_impl.cpp
parent4bfc5592239d96d6d352ddbbb906dde0ea4012be (diff)
downloadqtlocation-mapboxgl-4ea47151796cb885fbcb2dd3803aa3f7132467bb.tar.gz
[core] shared data among AnnotationTileFeature objects
Diffstat (limited to 'src/mbgl/annotation/shape_annotation_impl.cpp')
-rw-r--r--src/mbgl/annotation/shape_annotation_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp
index d3ddf62b9e..05ffce382d 100644
--- a/src/mbgl/annotation/shape_annotation_impl.cpp
+++ b/src/mbgl/annotation/shape_annotation_impl.cpp
@@ -38,7 +38,7 @@ void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, Annotati
if (shapeTile.features.empty())
return;
- AnnotationTileLayer& layer = data.layers.emplace(layerID, layerID).first->second;
+ AnnotationTileLayer& layer = data.addLayer(layerID);
ToGeometryCollection toGeometryCollection;
ToFeatureType toFeatureType;
@@ -53,7 +53,7 @@ void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, Annotati
renderGeometry = fixupPolygons(renderGeometry);
}
- layer.features.emplace_back(id, featureType, renderGeometry);
+ layer.addFeature(id, featureType, renderGeometry);
}
}