summaryrefslogtreecommitdiff
path: root/include/mbgl/style/expression/compound_expression.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/expression/compound_expression.hpp')
-rw-r--r--include/mbgl/style/expression/compound_expression.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/mbgl/style/expression/compound_expression.hpp b/include/mbgl/style/expression/compound_expression.hpp
index 9d39194563..04562752a6 100644
--- a/include/mbgl/style/expression/compound_expression.hpp
+++ b/include/mbgl/style/expression/compound_expression.hpp
@@ -62,7 +62,7 @@ struct SignatureBase {
class CompoundExpressionBase : public Expression {
public:
CompoundExpressionBase(std::string name_, const detail::SignatureBase& signature) :
- Expression(signature.result),
+ Expression(Kind::CompoundExpression, signature.result),
name(std::move(name_)),
params(signature.params)
{}
@@ -108,7 +108,8 @@ public:
}
bool operator==(const Expression& e) const override {
- if (auto rhs = dynamic_cast<const CompoundExpression*>(&e)) {
+ if (e.getKind() == Kind::CompoundExpression) {
+ auto rhs = static_cast<const CompoundExpression*>(&e);
return getName() == rhs->getName() && Expression::childrenEqual(args, rhs->args);
}
return false;