diff options
Diffstat (limited to 'src/mbgl/annotation/annotation_tile.cpp')
-rw-r--r-- | src/mbgl/annotation/annotation_tile.cpp | 7 |
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 { |