diff options
author | Lucas Wojciechowski <lucas@mapbox.com> | 2018-02-20 10:18:55 -0800 |
---|---|---|
committer | Lucas Wojciechowski <lucas@mapbox.com> | 2018-03-07 11:46:17 -0800 |
commit | 4eae9bb0c6d2d2d9a739ba6ad1b5ceaad106e854 (patch) | |
tree | a9236be1a0dfd6218f4432c93668c4bff1903aca | |
parent | 392fe113b529f705cee4a1757eedc6ef48023574 (diff) | |
download | qtlocation-mapboxgl-4eae9bb0c6d2d2d9a739ba6ad1b5ceaad106e854.tar.gz |
Replace `shared_ptr` with &reference
-rw-r--r-- | include/mbgl/style/filter.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/style/filter_evaluator.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/mbgl/style/filter.hpp b/include/mbgl/style/filter.hpp index a5bd32b71e..99a5426c2b 100644 --- a/include/mbgl/style/filter.hpp +++ b/include/mbgl/style/filter.hpp @@ -236,7 +236,7 @@ public: class ExpressionFilter { public: - std::shared_ptr<expression::Expression> expression; + expression::Expression &expression; friend bool operator==(const ExpressionFilter& lhs, const ExpressionFilter& rhs) { return lhs.expression == rhs.expression; diff --git a/src/mbgl/style/filter_evaluator.cpp b/src/mbgl/style/filter_evaluator.cpp index 72022172f4..39f356a8b1 100644 --- a/src/mbgl/style/filter_evaluator.cpp +++ b/src/mbgl/style/filter_evaluator.cpp @@ -213,7 +213,7 @@ bool FilterEvaluator::operator()(const NotHasIdentifierFilter&) const { } bool FilterEvaluator::operator()(const ExpressionFilter& filter) const { - const expression::EvaluationResult result = filter.expression->evaluate(context); + const expression::EvaluationResult result = filter.expression.evaluate(context); if (result) { const optional<bool> typed = expression::fromExpressionValue<bool>(*result); return typed ? *typed : false; |