diff options
Diffstat (limited to 'src/mbgl/style/expression/is_constant.cpp')
-rw-r--r-- | src/mbgl/style/expression/is_constant.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mbgl/style/expression/is_constant.cpp b/src/mbgl/style/expression/is_constant.cpp index 3b20f49a86..9704168a41 100644 --- a/src/mbgl/style/expression/is_constant.cpp +++ b/src/mbgl/style/expression/is_constant.cpp @@ -17,18 +17,22 @@ bool isFeatureConstant(const Expression& expression) { return false; } else if (name == "has" && parameterCount && *parameterCount == 1) { return false; - } else if (0 == name.rfind(filter, 0)) { - // Legacy filters begin with "filter-" and are never constant. - return false; } else if ( name == "properties" || name == "geometry-type" || name == "id" ) { return false; + } else if (0u == name.rfind(filter, 0u)) { + // Legacy filters begin with "filter-" and are never constant. + return false; } } + if (expression.getKind() == Kind::FormatSectionOverride) { + return false; + } + if (expression.getKind() == Kind::CollatorExpression) { // Although the results of a Collator expression with fixed arguments // generally shouldn't change between executions, we can't serialize them |