diff options
author | Anand Thakker <github@anandthakker.net> | 2018-01-16 08:44:10 -0500 |
---|---|---|
committer | Anand Thakker <github@anandthakker.net> | 2018-01-16 08:44:10 -0500 |
commit | 3601edd51b0809ac5fd8759b2f0cbc9882f1a99a (patch) | |
tree | e7a0d720e4c88e1ece9d1695aa750e54d0409164 | |
parent | 3a80ce06ae52b01731119d1544856d7ca78d1a73 (diff) | |
download | qtlocation-mapboxgl-3601edd51b0809ac5fd8759b2f0cbc9882f1a99a.tar.gz |
Just use PropertyEvaluator<Color> instead of specialized 'NoopPropertyEvaluator'upstream/heatmap-anandthakker
-rw-r--r-- | include/mbgl/style/heatmap_color_property_value.hpp | 10 | ||||
-rw-r--r-- | src/mbgl/style/paint_property.hpp | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/include/mbgl/style/heatmap_color_property_value.hpp b/include/mbgl/style/heatmap_color_property_value.hpp index 98640c2a41..1c642f66b9 100644 --- a/include/mbgl/style/heatmap_color_property_value.hpp +++ b/include/mbgl/style/heatmap_color_property_value.hpp @@ -3,17 +3,10 @@ #include <mbgl/util/variant.hpp> #include <mbgl/style/undefined.hpp> #include <mbgl/style/function/camera_function.hpp> -#include <mbgl/renderer/property_evaluation_parameters.hpp> namespace mbgl { namespace style { -class NoopPropertyEvaluator { -public: - using ResultType = Color; - NoopPropertyEvaluator(const PropertyEvaluationParameters&, Color) {} -}; - /* * Special-case implementation of (a subset of) the PropertyValue<T> interface * used for building the HeatmapColor paint property traits class. @@ -37,7 +30,8 @@ public: bool isUndefined() const { return value.get() != nullptr; } // noop, needed for batch evaluation of paint property values to compile - Color evaluate(const NoopPropertyEvaluator&, TimePoint = {}) const { return {}; } + template <typename Evaluator> + Color evaluate(const Evaluator&, TimePoint = {}) const { return {}; } bool isDataDriven() const { return false; } bool hasDataDrivenPropertyDifference(const HeatmapColorPropertyValue&) const { return false; } }; diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp index a16f58eb57..195eb645a9 100644 --- a/src/mbgl/style/paint_property.hpp +++ b/src/mbgl/style/paint_property.hpp @@ -63,7 +63,7 @@ class HeatmapColor { public: using TransitionableType = Transitionable<HeatmapColorPropertyValue>; using UnevaluatedType = Transitioning<HeatmapColorPropertyValue>; - using EvaluatorType = NoopPropertyEvaluator; + using EvaluatorType = PropertyEvaluator<Color>; using PossiblyEvaluatedType = Color; using Type = Color; static constexpr bool IsDataDriven = false; |