summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-07-05 14:26:56 -0700
committerMinh Nguyễn <mxn@1ec5.org>2018-07-09 16:02:40 -0700
commitd6a454ba8eb4546a52d941c63bf0331353873ad6 (patch)
tree580edc1ba5e5744e336b5e7ce5d60848a56b6c17 /src
parentf3718ff29387076c1b436e14a9b18ee99157ac33 (diff)
downloadqtlocation-mapboxgl-d6a454ba8eb4546a52d941c63bf0331353873ad6.tar.gz
[core] Comparison expressions can have 4th member
When detecting an expression used as a filter, relax the check for expressions to allow comparison expressions to contain a fourth member for the collator.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/conversion/filter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/style/conversion/filter.cpp b/src/mbgl/style/conversion/filter.cpp
index ad13470bca..cd588345ef 100644
--- a/src/mbgl/style/conversion/filter.cpp
+++ b/src/mbgl/style/conversion/filter.cpp
@@ -55,7 +55,7 @@ bool isExpression(const Convertible& filter) {
return false;
} else if (*op == "==" || *op == "!=" || *op == ">" || *op == ">=" || *op == "<" || *op == "<=") {
- return arrayLength(filter) == 3 && (isArray(arrayMember(filter, 1)) || isArray(arrayMember(filter, 2)));
+ return arrayLength(filter) != 3 || isArray(arrayMember(filter, 1)) || isArray(arrayMember(filter, 2));
} else if (*op == "any" || *op == "all") {
for (std::size_t i = 1; i < arrayLength(filter); i++) {