diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-26 15:12:43 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-10 11:33:17 -0800 |
commit | 54e08b1f83504e12cbc19b08295d9f9ed5177ab5 (patch) | |
tree | 40513395d4d0ed2d9003ef30a708f21b2e83e5ab /src/mbgl/style/property_evaluator.hpp | |
parent | a5625675890213f94de7632d4ef152ade627c9a5 (diff) | |
download | qtlocation-mapboxgl-54e08b1f83504e12cbc19b08295d9f9ed5177ab5.tar.gz |
[core] Eliminate use of ClassProperties for paint
Diffstat (limited to 'src/mbgl/style/property_evaluator.hpp')
-rw-r--r-- | src/mbgl/style/property_evaluator.hpp | 40 |
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 |