summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-07-23 08:54:16 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-24 21:04:56 +0300
commit852fef66ef4cbbe753527b42cf23c59de59399b3 (patch)
tree8636a881439c7ebf0b53b6a3fdbdc4d4bbf5a40a /src/mbgl/annotation
parent6798d21eda03ecc2fb2c46c448a45713fc493f86 (diff)
downloadqtlocation-mapboxgl-852fef66ef4cbbe753527b42cf23c59de59399b3.tar.gz
[core] Force getGeometries() return const ref
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r--src/mbgl/annotation/annotation_tile.cpp2
-rw-r--r--src/mbgl/annotation/annotation_tile.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp
index 6c3c9eb617..a410adc95e 100644
--- a/src/mbgl/annotation/annotation_tile.cpp
+++ b/src/mbgl/annotation/annotation_tile.cpp
@@ -58,7 +58,7 @@ FeatureIdentifier AnnotationTileFeature::getID() const {
return data->id;
}
-GeometryCollection AnnotationTileFeature::getGeometries() const {
+const GeometryCollection& AnnotationTileFeature::getGeometries() const {
return data->geometries;
}
diff --git a/src/mbgl/annotation/annotation_tile.hpp b/src/mbgl/annotation/annotation_tile.hpp
index 1e23fdf98a..741b598a8c 100644
--- a/src/mbgl/annotation/annotation_tile.hpp
+++ b/src/mbgl/annotation/annotation_tile.hpp
@@ -28,7 +28,7 @@ public:
FeatureType getType() const override;
optional<Value> getValue(const std::string&) const override;
FeatureIdentifier getID() const override;
- GeometryCollection getGeometries() const override;
+ const GeometryCollection& getGeometries() const override;
private:
std::shared_ptr<const AnnotationTileFeatureData> data;