diff options
author | Lauren Budorick <lauren@mapbox.com> | 2017-04-18 12:18:45 -0700 |
---|---|---|
committer | Lauren Budorick <lauren@mapbox.com> | 2017-04-24 17:10:32 -0700 |
commit | f83ca8a74a1e3690e1ecc1a99e2ae6fdb589e82f (patch) | |
tree | b487976004eeb10d9b14c5403930b8f4fce793d8 | |
parent | 035046ff4ee523d292bbcdad2707cebcce4b57e0 (diff) | |
download | qtlocation-mapboxgl-f83ca8a74a1e3690e1ecc1a99e2ae6fdb589e82f.tar.gz |
Review followups
* Add Map#getLight
* Don't rename Transitioning (fix compiling error)
-rw-r--r-- | include/mbgl/map/map.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/map/map.cpp | 8 | ||||
-rw-r--r-- | src/mbgl/style/light_impl.hpp | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 2441f9139c..84ea3104d8 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -182,6 +182,7 @@ public: // Light void setLight(std::unique_ptr<style::Light>); + style::Light* getLight(); // Defaults std::string getStyleName() const; diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 2e977d6eec..838e508bcf 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -987,6 +987,14 @@ void Map::setLight(std::unique_ptr<style::Light> light) { impl->style->light = *light; } +style::Light* Map::getLight() { + if (!impl->style) { + return nullptr; + } + + return &impl->style->light; +} + #pragma mark - Defaults std::string Map::getStyleName() const { diff --git a/src/mbgl/style/light_impl.hpp b/src/mbgl/style/light_impl.hpp index be967246bd..d1825090fc 100644 --- a/src/mbgl/style/light_impl.hpp +++ b/src/mbgl/style/light_impl.hpp @@ -53,14 +53,14 @@ class Evaluated<TypeList<Ps...>> : public IndexedTuple< { private: using Properties = TypeList<Ps...>; - using Transitioning = Transitioning<Properties>; + using TransitioningPs = Transitioning<Properties>; using Super = IndexedTuple< TypeList<Ps...>, TypeList<typename Ps::Type...>>; public: Evaluated() = default; - Evaluated(Transitioning& transitioning, const PropertyEvaluationParameters& params) + Evaluated(TransitioningPs& transitioning, const PropertyEvaluationParameters& params) : Super { transitioning.template get<Ps>() .evaluate(PropertyEvaluator<typename Ps::Type>(params, Ps::defaultValue()), params.now)... |