diff options
author | Anand Thakker <anandthakker@users.noreply.github.com> | 2018-04-09 17:59:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 17:59:18 -0400 |
commit | 8d26f7409106c94f37689d206f9a68aac57572a4 (patch) | |
tree | fa1dea3966bc88b76c4877663160b354ac5a01ab /include | |
parent | c1dabbde8d58143b1f7f64eddeb75c06ab417d32 (diff) | |
download | qtlocation-mapboxgl-8d26f7409106c94f37689d206f9a68aac57572a4.tar.gz |
Fix style parsing bug for constant expressions (#11606)
* Fix style parsing bug for constant expressions
Closes #10849
* Ignore tests for unported GL JS change
Refs https://github.com/mapbox/mapbox-gl-js/pull/6429
* Fuller fix
* Update mapbox-gl-js
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/style/conversion/data_driven_property_value.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/style/expression/let.hpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/mbgl/style/conversion/data_driven_property_value.hpp b/include/mbgl/style/conversion/data_driven_property_value.hpp index 5f4395f35a..b4297816df 100644 --- a/include/mbgl/style/conversion/data_driven_property_value.hpp +++ b/include/mbgl/style/conversion/data_driven_property_value.hpp @@ -44,8 +44,6 @@ struct Converter<DataDrivenPropertyValue<T>> { } else if (!featureConstant && !zoomConstant) { return DataDrivenPropertyValue<T>(CompositeFunction<T>(std::move(*expression))); } else { - // If an expression is neither zoom- nor feature-dependent, it - // should have been reduced to a Literal when it was parsed. auto literal = dynamic_cast<Literal*>(expression->get()); assert(literal); optional<T> constant = fromExpressionValue<T>(literal->getValue()); diff --git a/include/mbgl/style/expression/let.hpp b/include/mbgl/style/expression/let.hpp index 75d2adda62..d0210d8bba 100644 --- a/include/mbgl/style/expression/let.hpp +++ b/include/mbgl/style/expression/let.hpp @@ -70,6 +70,9 @@ public: mbgl::Value serialize() const override; std::string getOperator() const override { return "var"; } + + const std::shared_ptr<Expression>& getBoundExpression() const { return value; } + private: std::string name; std::shared_ptr<Expression> value; |