From 3601edd51b0809ac5fd8759b2f0cbc9882f1a99a Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Tue, 16 Jan 2018 08:44:10 -0500 Subject: Just use PropertyEvaluator instead of specialized 'NoopPropertyEvaluator' --- include/mbgl/style/heatmap_color_property_value.hpp | 10 ++-------- 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 #include #include -#include namespace mbgl { namespace style { -class NoopPropertyEvaluator { -public: - using ResultType = Color; - NoopPropertyEvaluator(const PropertyEvaluationParameters&, Color) {} -}; - /* * Special-case implementation of (a subset of) the PropertyValue 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 + 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; using UnevaluatedType = Transitioning; - using EvaluatorType = NoopPropertyEvaluator; + using EvaluatorType = PropertyEvaluator; using PossiblyEvaluatedType = Color; using Type = Color; static constexpr bool IsDataDriven = false; -- cgit v1.2.1