summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mbgl/style/function/composite_function.hpp3
-rw-r--r--include/mbgl/style/function/source_function.hpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/mbgl/style/function/composite_function.hpp b/include/mbgl/style/function/composite_function.hpp
index be238fe9c3..b31329b75e 100644
--- a/include/mbgl/style/function/composite_function.hpp
+++ b/include/mbgl/style/function/composite_function.hpp
@@ -73,8 +73,9 @@ public:
);
}
+ template <class Feature>
Range<T> evaluate(Range<InnerStops> coveringStops,
- const GeometryTileFeature& feature,
+ const Feature& feature,
T finalDefaultValue) const {
optional<Value> v = feature.getValue(property);
if (!v) {
diff --git a/include/mbgl/style/function/source_function.hpp b/include/mbgl/style/function/source_function.hpp
index 29b1067a19..f6601d9ea3 100644
--- a/include/mbgl/style/function/source_function.hpp
+++ b/include/mbgl/style/function/source_function.hpp
@@ -4,7 +4,6 @@
#include <mbgl/style/function/interval_stops.hpp>
#include <mbgl/style/function/categorical_stops.hpp>
#include <mbgl/style/function/identity_stops.hpp>
-#include <mbgl/tile/geometry_tile_data.hpp>
#include <mbgl/util/interpolate.hpp>
#include <mbgl/util/variant.hpp>
@@ -34,7 +33,8 @@ public:
defaultValue(std::move(defaultValue_)) {
}
- T evaluate(const GeometryTileFeature& feature, T finalDefaultValue) const {
+ template <class Feature>
+ T evaluate(const Feature& feature, T finalDefaultValue) const {
optional<Value> v = feature.getValue(property);
if (!v) {
return defaultValue.value_or(finalDefaultValue);