[core] Forward evaluation context directly to evaluated property

So that default value owned by the FormatSectionOverride, can be
evaluated based on required context parameters.
This commit is contained in:
Alexander Shalamov
2019-03-14 20:59:19 +02:00
parent 5733440747
commit 69e11155c8

View File

@@ -27,7 +27,11 @@ public:
return section.at(propertyName);
}
}
return defaultValue.evaluate(*context.feature, *context.zoom, T());
return defaultValue.match(
[&context] (const style::PropertyExpression<T>& e) { return e.getExpression().evaluate(context); },
[] (const T& t) -> EvaluationResult { return t; }
);
}
void eachChild(const std::function<void(const Expression&)>& fn) const final {