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-23 21:59:20 +0300 |
commit | d13ebedadbd6ef9d6308c3399d0d88b140de421d (patch) | |
tree | 9fbcd5274b408ee3a194560b6c5d4760aa118fb2 /include/mbgl/style/expression/array_assertion.hpp | |
parent | 3821f74079f88b6a5b3b0ea210fe529132a3494f (diff) | |
download | qtlocation-mapboxgl-d13ebedadbd6ef9d6308c3399d0d88b140de421d.tar.gz |
[core] Replace expressions RTTI with enums + static castupstream/expressions-rtti-refactor
Diffstat (limited to 'include/mbgl/style/expression/array_assertion.hpp')
-rw-r--r-- | include/mbgl/style/expression/array_assertion.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/mbgl/style/expression/array_assertion.hpp b/include/mbgl/style/expression/array_assertion.hpp index af153611ff..0c0912b73e 100644 --- a/include/mbgl/style/expression/array_assertion.hpp +++ b/include/mbgl/style/expression/array_assertion.hpp @@ -14,7 +14,7 @@ namespace expression { class ArrayAssertion : public Expression { public: ArrayAssertion(type::Array type_, std::unique_ptr<Expression> input_) : - Expression(type_), + Expression(Kind::ArrayAssertion, type_), input(std::move(input_)) {} @@ -24,7 +24,8 @@ public: void eachChild(const std::function<void(const Expression&)>& visit) const override; bool operator==(const Expression& e) const override { - if (auto rhs = dynamic_cast<const ArrayAssertion*>(&e)) { + if (e.getKind() == Kind::ArrayAssertion) { + auto rhs = static_cast<const ArrayAssertion*>(&e); return getType() == rhs->getType() && *input == *(rhs->input); } return false; |