summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/match.cpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-07-20 15:40:47 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-07-24 10:06:18 +0300
commitcb714d57c5c5ad181aaf5e1690221da8d965682b (patch)
tree21fa8cc6caf1e66de40f9715fa98426e86cfd964 /src/mbgl/style/expression/match.cpp
parent1683da3225d0cbed3bb6238fd292fa288f6a32d6 (diff)
downloadqtlocation-mapboxgl-cb714d57c5c5ad181aaf5e1690221da8d965682b.tar.gz
[core] Replace expressions RTTI with enums + static cast
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));