diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-02-01 20:24:49 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-02-04 13:30:21 +0200 |
commit | e45c3926c26884aceca5789837e1c1b31a51154e (patch) | |
tree | 2c954fb953e70b7a670b7c879b67f8bf50ef6471 /src/mbgl/renderer/possibly_evaluated_property_value.hpp | |
parent | b56a7181afc40029d4280d60489d989b5dddf304 (diff) | |
download | qtlocation-mapboxgl-e45c3926c26884aceca5789837e1c1b31a51154e.tar.gz |
[core] Reduce presence of the 'useIntegerZoom' option
The `useIntegerZoom` presence is now limited: it is removed
from `PossiblyEvaluatedPropertyValue` class specializations
(was never used there!) and from the `PropertyEvaluationParameters`
class, so we do not have to copy `PropertyEvaluationParameters`
instance at `RenderLineLayer::evaluate`.
Diffstat (limited to 'src/mbgl/renderer/possibly_evaluated_property_value.hpp')
-rw-r--r-- | src/mbgl/renderer/possibly_evaluated_property_value.hpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/mbgl/renderer/possibly_evaluated_property_value.hpp b/src/mbgl/renderer/possibly_evaluated_property_value.hpp index 353df2ab90..625235011c 100644 --- a/src/mbgl/renderer/possibly_evaluated_property_value.hpp +++ b/src/mbgl/renderer/possibly_evaluated_property_value.hpp @@ -18,9 +18,8 @@ private: public: PossiblyEvaluatedPropertyValue() = default; - PossiblyEvaluatedPropertyValue(Value v, bool useIntegerZoom_ = false) - : value(std::move(v)), - useIntegerZoom(useIntegerZoom_) {} + PossiblyEvaluatedPropertyValue(Value v) + : value(std::move(v)) {} bool isConstant() const { return value.template is<T>(); @@ -46,16 +45,10 @@ public: return this->match( [&] (const T& constant_) { return constant_; }, [&] (const style::PropertyExpression<T>& expression) { - if (useIntegerZoom) { - return expression.evaluate(floor(zoom), feature, defaultValue); - } else { - return expression.evaluate(zoom, feature, defaultValue); - } + return expression.evaluate(zoom, feature, defaultValue); } ); } - - bool useIntegerZoom; }; template <class T> @@ -69,9 +62,8 @@ private: public: PossiblyEvaluatedPropertyValue() = default; - PossiblyEvaluatedPropertyValue(Value v, bool useIntegerZoom_ = false) - : value(std::move(v)), - useIntegerZoom(useIntegerZoom_) {} + PossiblyEvaluatedPropertyValue(Value v) + : value(std::move(v)) {} bool isConstant() const { return value.template is<Faded<T>>(); @@ -108,8 +100,6 @@ public: } ); } - - bool useIntegerZoom; }; |