diff options
author | Anand Thakker <github@anandthakker.net> | 2017-07-09 17:00:52 -0400 |
---|---|---|
committer | Anand Thakker <github@anandthakker.net> | 2017-07-09 17:00:52 -0400 |
commit | 945cdebe9b37c3de764d382cf216d55ee0b7fce6 (patch) | |
tree | 8f144b4b2d24f0d8fc26538c3fea189cf60782fe /src | |
parent | 8f7bfb80c401447758229a92d6b268783089f23c (diff) | |
download | qtlocation-mapboxgl-945cdebe9b37c3de764d382cf216d55ee0b7fce6.tar.gz |
Wrap EvaluationParameters and return an <Error, Value> variant
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/style/function/expression.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/style/function/expression.cpp b/src/mbgl/style/function/expression.cpp index b609a6e576..1c24378265 100644 --- a/src/mbgl/style/function/expression.cpp +++ b/src/mbgl/style/function/expression.cpp @@ -29,18 +29,18 @@ public: return {}; } - optional<Value> getValue(const std::string& key) const override { + optional<mbgl::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<mbgl::Value>(it->second); } - return optional<Value>(); + return optional<mbgl::Value>(); } }; -optional<OutputValue> Expression::evaluate(float z, const Feature& feature, EvaluationError& error) const { +EvaluationResult Expression::evaluate(float z, const Feature& feature) const { std::unique_ptr<const GeometryTileFeature> f = std::make_unique<const GeoJSONFeature>(feature); - return this->evaluate(z, *f, error); + return this->evaluate(EvaluationParameters {z, *f}); } |