summaryrefslogtreecommitdiff
path: root/src/mbgl/style/light.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-05-02 15:25:48 +0200
committerKonstantin Käfer <mail@kkaefer.com>2019-05-02 17:44:18 +0200
commit2489afdd0db97de0664198f5ae64bd94db6b6fc7 (patch)
treea7a52194daab971f58f60ef21bd45b1a0d517f4b /src/mbgl/style/light.cpp
parenta48152a9811a856e467eff3e396a76a059558fb1 (diff)
downloadqtlocation-mapboxgl-2489afdd0db97de0664198f5ae64bd94db6b6fc7.tar.gz
[build] change style code generator to sort properties alphabetically
JSON keys in our style specification don't have a defined order. This change sorts them alphabetically so that we can rely on the order remaining them same across code generation runs.
Diffstat (limited to 'src/mbgl/style/light.cpp')
-rw-r--r--src/mbgl/style/light.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/mbgl/style/light.cpp b/src/mbgl/style/light.cpp
index 352dc4d942..a88cc02bd7 100644
--- a/src/mbgl/style/light.cpp
+++ b/src/mbgl/style/light.cpp
@@ -50,32 +50,6 @@ TransitionOptions Light::getAnchorTransition() const {
return impl->properties.template get<LightAnchor>().options;
}
-Position Light::getDefaultPosition() {
- return LightPosition::defaultValue();
-}
-
-PropertyValue<Position> Light::getPosition() const {
- return impl->properties.template get<LightPosition>().value;
-}
-
-void Light::setPosition(PropertyValue<Position> property) {
- auto impl_ = mutableImpl();
- impl_->properties.template get<LightPosition>().value = property;
- impl = std::move(impl_);
- observer->onLightChanged(*this);
-}
-
-void Light::setPositionTransition(const TransitionOptions& options) {
- auto impl_ = mutableImpl();
- impl_->properties.template get<LightPosition>().options = options;
- impl = std::move(impl_);
- observer->onLightChanged(*this);
-}
-
-TransitionOptions Light::getPositionTransition() const {
- return impl->properties.template get<LightPosition>().options;
-}
-
Color Light::getDefaultColor() {
return LightColor::defaultValue();
}
@@ -128,6 +102,32 @@ TransitionOptions Light::getIntensityTransition() const {
return impl->properties.template get<LightIntensity>().options;
}
+Position Light::getDefaultPosition() {
+ return LightPosition::defaultValue();
+}
+
+PropertyValue<Position> Light::getPosition() const {
+ return impl->properties.template get<LightPosition>().value;
+}
+
+void Light::setPosition(PropertyValue<Position> property) {
+ auto impl_ = mutableImpl();
+ impl_->properties.template get<LightPosition>().value = property;
+ impl = std::move(impl_);
+ observer->onLightChanged(*this);
+}
+
+void Light::setPositionTransition(const TransitionOptions& options) {
+ auto impl_ = mutableImpl();
+ impl_->properties.template get<LightPosition>().options = options;
+ impl = std::move(impl_);
+ observer->onLightChanged(*this);
+}
+
+TransitionOptions Light::getPositionTransition() const {
+ return impl->properties.template get<LightPosition>().options;
+}
+
} // namespace style
} // namespace mbgl