diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-06-28 08:21:30 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-06-28 10:00:40 -0700 |
commit | e323daf71fb3698cd53a49b4a7fd296d8cd6dd19 (patch) | |
tree | 83b1328ee8691c49c2c1340fcae3204442c0b4a0 /include/mbgl | |
parent | 1dd35eface06c253c6e039b49942bdeb32991839 (diff) | |
download | qtlocation-mapboxgl-e323daf71fb3698cd53a49b4a7fd296d8cd6dd19.tar.gz |
[core] InterpolateBase → Interpolate; Interpolate → InterpolateImpl
Diffstat (limited to 'include/mbgl')
4 files changed, 9 insertions, 9 deletions
diff --git a/include/mbgl/style/expression/find_zoom_curve.hpp b/include/mbgl/style/expression/find_zoom_curve.hpp index 6301938033..1e19436dd9 100644 --- a/include/mbgl/style/expression/find_zoom_curve.hpp +++ b/include/mbgl/style/expression/find_zoom_curve.hpp @@ -11,9 +11,9 @@ namespace mbgl { namespace style { namespace expression { -optional<variant<const InterpolateBase*, const Step*, ParsingError>> findZoomCurve(const expression::Expression* e); +optional<variant<const Interpolate*, const Step*, ParsingError>> findZoomCurve(const expression::Expression* e); -variant<const InterpolateBase*, const Step*> findZoomCurveChecked(const expression::Expression* e); +variant<const Interpolate*, const Step*> findZoomCurveChecked(const expression::Expression* e); } // namespace expression } // namespace style diff --git a/include/mbgl/style/expression/interpolate.hpp b/include/mbgl/style/expression/interpolate.hpp index dcdfa302ba..0e7682007f 100644 --- a/include/mbgl/style/expression/interpolate.hpp +++ b/include/mbgl/style/expression/interpolate.hpp @@ -16,9 +16,9 @@ namespace expression { ParseResult parseInterpolate(const mbgl::style::conversion::Convertible& value, ParsingContext& ctx); -class InterpolateBase : public Expression { +class Interpolate : public Expression { public: - InterpolateBase(const type::Type& type_, + Interpolate(const type::Type& type_, Interpolator interpolator_, std::unique_ptr<Expression> input_, std::map<double, std::unique_ptr<Expression>> stops_ @@ -56,7 +56,7 @@ public: } bool operator==(const Expression& e) const override { - if (auto rhs = dynamic_cast<const InterpolateBase*>(&e)) { + if (auto rhs = dynamic_cast<const Interpolate*>(&e)) { if (interpolator != rhs->interpolator || *input != *(rhs->input) || stops.size() != rhs->stops.size()) diff --git a/include/mbgl/style/function/camera_function.hpp b/include/mbgl/style/function/camera_function.hpp index 97ba633e44..479deb20df 100644 --- a/include/mbgl/style/function/camera_function.hpp +++ b/include/mbgl/style/function/camera_function.hpp @@ -54,7 +54,7 @@ public: float interpolationFactor(const Range<float>& inputLevels, const float inputValue) const { return zoomCurve.match( - [&](const expression::InterpolateBase* z) { + [&](const expression::Interpolate* z) { return z->interpolationFactor(Range<double> { inputLevels.min, inputLevels.max }, inputValue); }, [&](const expression::Step*) { return 0.0f; } @@ -83,7 +83,7 @@ public: private: std::shared_ptr<expression::Expression> expression; - const variant<const expression::InterpolateBase*, const expression::Step*> zoomCurve; + const variant<const expression::Interpolate*, const expression::Step*> zoomCurve; }; } // namespace style diff --git a/include/mbgl/style/function/composite_function.hpp b/include/mbgl/style/function/composite_function.hpp index 614c345c25..93986f82f2 100644 --- a/include/mbgl/style/function/composite_function.hpp +++ b/include/mbgl/style/function/composite_function.hpp @@ -89,7 +89,7 @@ public: float interpolationFactor(const Range<float>& inputLevels, const float inputValue) const { return zoomCurve.match( - [&](const expression::InterpolateBase* z) { + [&](const expression::Interpolate* z) { return z->interpolationFactor(Range<double> { inputLevels.min, inputLevels.max }, inputValue); }, [&](const expression::Step*) { return 0.0f; } @@ -119,7 +119,7 @@ public: private: optional<T> defaultValue; std::shared_ptr<expression::Expression> expression; - const variant<const expression::InterpolateBase*, const expression::Step*> zoomCurve; + const variant<const expression::Interpolate*, const expression::Step*> zoomCurve; }; } // namespace style |