diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-07-20 15:40:47 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-07-24 10:06:18 +0300 |
commit | cb714d57c5c5ad181aaf5e1690221da8d965682b (patch) | |
tree | 21fa8cc6caf1e66de40f9715fa98426e86cfd964 /src/mbgl/style/expression/case.cpp | |
parent | 1683da3225d0cbed3bb6238fd292fa288f6a32d6 (diff) | |
download | qtlocation-mapboxgl-cb714d57c5c5ad181aaf5e1690221da8d965682b.tar.gz |
[core] Replace expressions RTTI with enums + static cast
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; |