diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-11-30 14:31:37 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-01-14 10:45:49 -0400 |
commit | f31386385952f42e0468c7d7a0ab0a066f0bf803 (patch) | |
tree | 74432eaa3544daa5f749a315399249c1af30e718 /src/mbgl/tile/geojson_tile_data.hpp | |
parent | a4f2fe4209ef6961662fb53ee5c29cafacd2a303 (diff) | |
download | qtlocation-mapboxgl-f31386385952f42e0468c7d7a0ab0a066f0bf803.tar.gz |
[core] Remove optional from GeometryTileFeature::getValue()upstream/geometrytilefeature-getvalue-no-optional
Diffstat (limited to 'src/mbgl/tile/geojson_tile_data.hpp')
-rw-r--r-- | src/mbgl/tile/geojson_tile_data.hpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mbgl/tile/geojson_tile_data.hpp b/src/mbgl/tile/geojson_tile_data.hpp index 70a985db47..9325f1bb16 100644 --- a/src/mbgl/tile/geojson_tile_data.hpp +++ b/src/mbgl/tile/geojson_tile_data.hpp @@ -36,12 +36,8 @@ public: return geometry; } - optional<Value> getValue(const std::string& key) const override { - auto it = feature.properties.find(key); - if (it != feature.properties.end()) { - return optional<Value>(it->second); - } - return optional<Value>(); + Value getValue(const std::string& key) const override { + return feature.properties.count(key) ? feature.properties.at(key) : NullValue(); } }; |