summaryrefslogtreecommitdiff
path: root/src/mbgl/tile/geojson_tile_data.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/tile/geojson_tile_data.hpp')
-rw-r--r--src/mbgl/tile/geojson_tile_data.hpp8
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();
}
};