diff options
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; |