summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/length.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/expression/length.cpp')
-rw-r--r--src/mbgl/style/expression/length.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mbgl/style/expression/length.cpp b/src/mbgl/style/expression/length.cpp
index 258353ae4e..ad7a15675a 100644
--- a/src/mbgl/style/expression/length.cpp
+++ b/src/mbgl/style/expression/length.cpp
@@ -6,7 +6,7 @@ namespace style {
namespace expression {
Length::Length(std::unique_ptr<Expression> input_)
- : Expression(type::Number),
+ : Expression(Kind::Length, type::Number),
input(std::move(input_)) {
}
@@ -30,7 +30,8 @@ void Length::eachChild(const std::function<void(const Expression&)>& visit) cons
}
bool Length::operator==(const Expression& e) const {
- if (auto eq = dynamic_cast<const Length*>(&e)) {
+ if (e.getKind() == Kind::Length) {
+ auto eq = static_cast<const Length*>(&e);
return *eq->input == *input;
}
return false;