summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation/annotation_tile.cpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-11-30 14:31:37 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-01-14 10:45:49 -0400
commitf31386385952f42e0468c7d7a0ab0a066f0bf803 (patch)
tree74432eaa3544daa5f749a315399249c1af30e718 /src/mbgl/annotation/annotation_tile.cpp
parenta4f2fe4209ef6961662fb53ee5c29cafacd2a303 (diff)
downloadqtlocation-mapboxgl-f31386385952f42e0468c7d7a0ab0a066f0bf803.tar.gz
[core] Remove optional from GeometryTileFeature::getValue()upstream/geometrytilefeature-getvalue-no-optional
Diffstat (limited to 'src/mbgl/annotation/annotation_tile.cpp')
-rw-r--r--src/mbgl/annotation/annotation_tile.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp
index 74a7dad682..d22e1ca9b3 100644
--- a/src/mbgl/annotation/annotation_tile.cpp
+++ b/src/mbgl/annotation/annotation_tile.cpp
@@ -47,12 +47,9 @@ FeatureType AnnotationTileFeature::getType() const {
return data->type;
}
-optional<Value> AnnotationTileFeature::getValue(const std::string& key) const {
+Value AnnotationTileFeature::getValue(const std::string& key) const {
auto it = data->properties.find(key);
- if (it != data->properties.end()) {
- return optional<Value>(it->second);
- }
- return optional<Value>();
+ return it != data->properties.cend() ? it->second : NullValue();
}
FeatureIdentifier AnnotationTileFeature::getID() const {