diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2018-07-05 14:26:56 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2018-07-09 16:02:40 -0700 |
commit | d6a454ba8eb4546a52d941c63bf0331353873ad6 (patch) | |
tree | 580edc1ba5e5744e336b5e7ce5d60848a56b6c17 /src | |
parent | f3718ff29387076c1b436e14a9b18ee99157ac33 (diff) | |
download | qtlocation-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.cpp | 2 |
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++) { |