summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2020-02-03 16:53:15 +0200
committerzmiao <miao.zhao@mapbox.com>2020-02-12 12:24:05 +0200
commit1bd2ccf2398004b02b479e6ad3144f52e7631b2a (patch)
tree52d62b6ec5d7beb34c76122059ad00359bb23b3c /include
parent3e99c08ea610d791b21f1631308451687c464d98 (diff)
downloadqtlocation-mapboxgl-1bd2ccf2398004b02b479e6ad3144f52e7631b2a.tar.gz
Enable within expression with Filter
add canonical as pointer fix review findings
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/expression/expression.hpp6
-rw-r--r--include/mbgl/style/expression/within.hpp6
2 files changed, 7 insertions, 5 deletions
diff --git a/include/mbgl/style/expression/expression.hpp b/include/mbgl/style/expression/expression.hpp
index f19f64c1e7..1e34a8bd38 100644
--- a/include/mbgl/style/expression/expression.hpp
+++ b/include/mbgl/style/expression/expression.hpp
@@ -54,20 +54,20 @@ public:
return *this;
};
- EvaluationContext& withCanonicalTileID(const mbgl::CanonicalTileID& canonical_) noexcept {
+ EvaluationContext& withCanonicalTileID(const mbgl::CanonicalTileID* canonical_) noexcept {
canonical = canonical_;
return *this;
};
optional<float> zoom;
optional<mbgl::Value> accumulated;
- optional<mbgl::CanonicalTileID> canonical;
- GeometryTileFeature const * feature = nullptr;
+ GeometryTileFeature const* feature = nullptr;
optional<double> colorRampParameter;
// Contains formatted section object, std::unordered_map<std::string, Value>.
const Value* formattedSection = nullptr;
const FeatureState* featureState = nullptr;
const std::set<std::string>* availableImages = nullptr;
+ const mbgl::CanonicalTileID* canonical = nullptr;
};
template <typename T>
diff --git a/include/mbgl/style/expression/within.hpp b/include/mbgl/style/expression/within.hpp
index 5e2b5e0671..88e9cc56b8 100644
--- a/include/mbgl/style/expression/within.hpp
+++ b/include/mbgl/style/expression/within.hpp
@@ -11,9 +11,11 @@ namespace mbgl {
namespace style {
namespace expression {
-class Within : public Expression {
+class Within final : public Expression {
public:
- Within(GeoJSON& geojson) : Expression(Kind::Within, type::Boolean), geoJSONSource(geojson) {}
+ explicit Within(GeoJSON geojson);
+
+ ~Within() final;
EvaluationResult evaluate(const EvaluationContext&) const override;