From 352d63d2ce98286cd854b11e85d66440501a6fd0 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 12 Apr 2018 16:02:48 -0400 Subject: Don't enforce ["zoom"] constraints for filters (#11672) * Don't enforce ["zoom"] constraints for filters Fixes #11594 * Add a couple of comments * Fix ambiguous constructor call * ParsingContext(optional) => ParsingContext(Type) --- include/mbgl/style/conversion/heatmap_color_property_value.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/mbgl/style/conversion/heatmap_color_property_value.hpp') diff --git a/include/mbgl/style/conversion/heatmap_color_property_value.hpp b/include/mbgl/style/conversion/heatmap_color_property_value.hpp index e3689c524c..a4710792d2 100644 --- a/include/mbgl/style/conversion/heatmap_color_property_value.hpp +++ b/include/mbgl/style/conversion/heatmap_color_property_value.hpp @@ -4,11 +4,11 @@ #include #include #include -#include #include #include #include #include +#include namespace mbgl { namespace style { @@ -17,11 +17,14 @@ namespace conversion { template <> struct Converter { optional operator()(const Convertible& value, Error& error) const { + using namespace mbgl::style::expression; if (isUndefined(value)) { return HeatmapColorPropertyValue(); } else if (isExpression(value)) { - optional> expression = convert>(value, error, expression::type::Color); + ParsingContext ctx(type::Color); + ParseResult expression = ctx.parseLayerPropertyExpression(value); if (!expression) { + error = { ctx.getCombinedErrors() }; return {}; } assert(*expression); -- cgit v1.2.1