From 3c23faf65ade59b62d41b68891bfac238acfc9ea Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 20 Apr 2017 15:28:28 -0700 Subject: [core] More complete fix for composite function interpolation edge case b5b4549 / #8613 handled the edge case for layout properties, but not paint properties. Move the check for a degenerate range to interpolationFactor in order to handle both correctly. --- include/mbgl/style/function/composite_function.hpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/mbgl/style') diff --git a/include/mbgl/style/function/composite_function.hpp b/include/mbgl/style/function/composite_function.hpp index 2b4ae504ca..9275ccdf8f 100644 --- a/include/mbgl/style/function/composite_function.hpp +++ b/include/mbgl/style/function/composite_function.hpp @@ -100,9 +100,6 @@ public: T evaluate(float zoom, const GeometryTileFeature& feature, T finalDefaultValue) const { std::tuple, Range> ranges = coveringRanges(zoom); Range resultRange = evaluate(std::get<1>(ranges), feature, finalDefaultValue); - // If the covering stop range is constant, just return the output value directly. - if (resultRange.min == resultRange.max) return resultRange.min; - // Otherwise, interpolate between the two stops. return util::interpolate( resultRange.min, resultRange.max, -- cgit v1.2.1