diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-02-25 10:19:56 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-02-26 18:15:23 +0200 |
commit | 713299c429ab494e4cc3347d9dcd76b67ba2522c (patch) | |
tree | 4cf300eba41085538c879cef54e7895b72669a3a /include/mbgl/style/filter.hpp | |
parent | 950fdcd44773ecbd4720e6c7bce7c6b7d1c7f596 (diff) | |
download | qtlocation-mapboxgl-713299c429ab494e4cc3347d9dcd76b67ba2522c.tar.gz |
[core] Add layer serialization method
Diffstat (limited to 'include/mbgl/style/filter.hpp')
-rw-r--r-- | include/mbgl/style/filter.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mbgl/style/filter.hpp b/include/mbgl/style/filter.hpp index c9dc9fb1ec..e0623a20d4 100644 --- a/include/mbgl/style/filter.hpp +++ b/include/mbgl/style/filter.hpp @@ -28,6 +28,8 @@ public: bool operator()(const expression::EvaluationContext& context) const; + operator bool() const { return expression || legacyFilter; } + friend bool operator==(const Filter& lhs, const Filter& rhs) { if (!lhs.expression || !rhs.expression) { return lhs.expression == rhs.expression; |