summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/match.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/expression/match.cpp')
-rw-r--r--src/mbgl/style/expression/match.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/style/expression/match.cpp b/src/mbgl/style/expression/match.cpp
index 59123c9812..340f1dab4d 100644
--- a/src/mbgl/style/expression/match.cpp
+++ b/src/mbgl/style/expression/match.cpp
@@ -18,7 +18,8 @@ void Match<T>::eachChild(const std::function<void(const Expression&)>& visit) co
template <typename T>
bool Match<T>::operator==(const Expression& e) const {
- if (auto rhs = dynamic_cast<const Match*>(&e)) {
+ if (e.getKind() == Kind::Match) {
+ auto rhs = static_cast<const Match*>(&e);
return (*input == *(rhs->input) &&
*otherwise == *(rhs->otherwise) &&
Expression::childrenEqual(branches, rhs->branches));