diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2019-09-17 15:40:01 +0300 |
---|---|---|
committer | Juha Alanen <19551460+jmalanen@users.noreply.github.com> | 2019-09-18 14:29:15 +0300 |
commit | 6b13c42314f28e3b27111367c4f3296c3c3c1248 (patch) | |
tree | 2f91aae637e2c49bb55cfc336f772ac772ab5a2d /include/mbgl | |
parent | 0042f0b9f5de7151f14300f02a559b6ecb48a507 (diff) | |
download | qtlocation-mapboxgl-6b13c42314f28e3b27111367c4f3296c3c3c1248.tar.gz |
[build] Fix clang format and tidy checks
Diffstat (limited to 'include/mbgl')
-rw-r--r-- | include/mbgl/renderer/renderer.hpp | 18 | ||||
-rw-r--r-- | include/mbgl/style/expression/expression.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/util/feature.hpp | 20 |
3 files changed, 12 insertions, 31 deletions
diff --git a/include/mbgl/renderer/renderer.hpp b/include/mbgl/renderer/renderer.hpp index e35c774aa0..7a1ddde1c1 100644 --- a/include/mbgl/renderer/renderer.hpp +++ b/include/mbgl/renderer/renderer.hpp @@ -49,20 +49,14 @@ public: const std::string& extensionField, const optional<std::map<std::string, Value>>& args = {}) const; - void setFeatureState(const std::string& sourceID, - const optional<std::string>& sourceLayerID, - const std::string& featureID, - const FeatureState& state); - - void getFeatureState(FeatureState& state, - const std::string& sourceID, - const optional<std::string>& sourceLayerID, + void setFeatureState(const std::string& sourceID, const optional<std::string>& sourceLayerID, + const std::string& featureID, const FeatureState& state); + + void getFeatureState(FeatureState& state, const std::string& sourceID, const optional<std::string>& sourceLayerID, const std::string& featureID) const; - void removeFeatureState(const std::string& sourceID, - const optional<std::string>& sourceLayerID, - const optional<std::string>& featureID, - const optional<std::string>& stateKey); + void removeFeatureState(const std::string& sourceID, const optional<std::string>& sourceLayerID, + const optional<std::string>& featureID, const optional<std::string>& stateKey); // Debug void dumpDebugLogs(); diff --git a/include/mbgl/style/expression/expression.hpp b/include/mbgl/style/expression/expression.hpp index 994254fed5..1341a8d041 100644 --- a/include/mbgl/style/expression/expression.hpp +++ b/include/mbgl/style/expression/expression.hpp @@ -34,9 +34,8 @@ public: EvaluationContext(optional<mbgl::Value> accumulated_, GeometryTileFeature const * feature_) : accumulated(std::move(accumulated_)), feature(feature_) {} - EvaluationContext(float zoom_, GeometryTileFeature const * feature_, const FeatureState* state_) : - zoom(zoom_), feature(feature_), featureState(state_) - {} + EvaluationContext(float zoom_, GeometryTileFeature const* feature_, const FeatureState* state_) + : zoom(zoom_), feature(feature_), featureState(state_) {} EvaluationContext(optional<float> zoom_, GeometryTileFeature const * feature_, optional<double> colorRampParameter_) : zoom(std::move(zoom_)), feature(feature_), colorRampParameter(std::move(colorRampParameter_)) {} diff --git a/include/mbgl/util/feature.hpp b/include/mbgl/util/feature.hpp index d2a23cc5b0..390cc65720 100644 --- a/include/mbgl/util/feature.hpp +++ b/include/mbgl/util/feature.hpp @@ -13,7 +13,7 @@ using PropertyMap = mapbox::feature::property_map; using FeatureIdentifier = mapbox::feature::identifier; using Feature = mapbox::feature::feature<double>; using FeatureState = PropertyMap; -using FeatureStates = std::unordered_map<std::string, FeatureState>; // <featureID, FeatureState> +using FeatureStates = std::unordered_map<std::string, FeatureState>; // <featureID, FeatureState> using LayerFeatureStates = std::unordered_map<std::string, FeatureStates>; // <sourceLayer, FeatureStates> template <class T> @@ -39,21 +39,9 @@ inline optional<std::string> featureIDtoString(const FeatureIdentifier& id) { } return id.match( - [] (const std::string& value_) { - return value_; - }, - [] (uint64_t value_) { - return util::toString(value_); - }, - [] (int64_t value_) { - return util::toString(value_); - }, - [] (double value_) { - return util::toString(value_); - }, - [] (const auto&) -> optional<std::string> { - return nullopt; - }); + [](const std::string& value_) { return value_; }, [](uint64_t value_) { return util::toString(value_); }, + [](int64_t value_) { return util::toString(value_); }, [](double value_) { return util::toString(value_); }, + [](const auto&) -> optional<std::string> { return nullopt; }); } } // namespace mbgl |