summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/step.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/expression/step.cpp')
-rw-r--r--src/mbgl/style/expression/step.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/style/expression/step.cpp b/src/mbgl/style/expression/step.cpp
index 614a2addad..34537d48ae 100644
--- a/src/mbgl/style/expression/step.cpp
+++ b/src/mbgl/style/expression/step.cpp
@@ -40,6 +40,12 @@ void Step::eachChild(const std::function<void(const Expression&)>& visit) const
}
}
+void Step::eachStop(const std::function<void(double, const Expression&)>& visit) const {
+ for (const auto &stop : stops) {
+ visit(stop.first, *stop.second);
+ }
+}
+
bool Step::operator==(const Expression& e) const {
if (auto rhs = dynamic_cast<const Step*>(&e)) {
return *input == *(rhs->input) && Expression::childrenEqual(stops, rhs->stops);