diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-06-20 11:40:56 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-06-21 17:18:08 -0700 |
commit | 4ea47151796cb885fbcb2dd3803aa3f7132467bb (patch) | |
tree | 3c10360ed2da83e4e912576560ba2841b0af9597 /src/mbgl/annotation/shape_annotation_impl.cpp | |
parent | 4bfc5592239d96d6d352ddbbb906dde0ea4012be (diff) | |
download | qtlocation-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.cpp | 4 |
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); } } |