summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/assertion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/expression/assertion.cpp')
-rw-r--r--src/mbgl/style/expression/assertion.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mbgl/style/expression/assertion.cpp b/src/mbgl/style/expression/assertion.cpp
index eefc9e24f8..2434d7a2f8 100644
--- a/src/mbgl/style/expression/assertion.cpp
+++ b/src/mbgl/style/expression/assertion.cpp
@@ -8,7 +8,7 @@ namespace expression {
using namespace mbgl::style::conversion;
Assertion::Assertion(type::Type type_, std::vector<std::unique_ptr<Expression>> inputs_) :
- Expression(type_),
+ Expression(Kind::Assertion, type_),
inputs(std::move(inputs_))
{
assert(!inputs.empty());
@@ -72,7 +72,8 @@ void Assertion::eachChild(const std::function<void(const Expression&)>& visit) c
};
bool Assertion::operator==(const Expression& e) const {
- if (auto rhs = dynamic_cast<const Assertion*>(&e)) {
+ if (e.getKind() == Kind::Assertion) {
+ auto rhs = static_cast<const Assertion*>(&e);
return getType() == rhs->getType() && Expression::childrenEqual(inputs, rhs->inputs);
}
return false;