summaryrefslogtreecommitdiff
path: root/src/mbgl/style/property_evaluator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/property_evaluator.hpp')
-rw-r--r--src/mbgl/style/property_evaluator.hpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/mbgl/style/property_evaluator.hpp b/src/mbgl/style/property_evaluator.hpp
deleted file mode 100644
index 81d2c93342..0000000000
--- a/src/mbgl/style/property_evaluator.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef MBGL_PROPERTY_EVALUATOR
-#define MBGL_PROPERTY_EVALUATOR
-
-#include <mbgl/style/zoom_history.hpp>
-#include <mbgl/style/function.hpp>
-#include <mbgl/style/style_calculation_parameters.hpp>
-
-namespace mbgl {
-
-struct ZoomHistory;
-
-template <typename T>
-class PropertyEvaluator {
-public:
- typedef T result_type;
-
- PropertyEvaluator(const StyleCalculationParameters& parameters_)
- : parameters(parameters_) {}
-
- template <typename P, typename std::enable_if<std::is_convertible<P, T>::value, int>::type = 0>
- T operator()(const P &value) const {
- return value;
- }
-
- T operator()(const Function<T>& value) const {
- return value.evaluate(parameters);
- }
-
- template <typename P, typename std::enable_if<!std::is_convertible<P, T>::value, int>::type = 0>
- T operator()(const P &) const {
- return T();
- }
-
-private:
- StyleCalculationParameters parameters;
-};
-
-}
-
-#endif