diff options
Diffstat (limited to 'src/mbgl/style/expression/case.cpp')
-rw-r--r-- | src/mbgl/style/expression/case.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/style/expression/case.cpp b/src/mbgl/style/expression/case.cpp index 295e694189..e885c0ce6b 100644 --- a/src/mbgl/style/expression/case.cpp +++ b/src/mbgl/style/expression/case.cpp @@ -28,7 +28,8 @@ void Case::eachChild(const std::function<void(const Expression&)>& visit) const } bool Case::operator==(const Expression& e) const { - if (auto rhs = dynamic_cast<const Case*>(&e)) { + if (e.getKind() == Kind::Case) { + auto rhs = static_cast<const Case*>(&e); return *otherwise == *(rhs->otherwise) && Expression::childrenEqual(branches, rhs->branches); } return false; |