diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-05-02 15:25:48 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-05-02 17:44:18 +0200 |
commit | 2489afdd0db97de0664198f5ae64bd94db6b6fc7 (patch) | |
tree | a7a52194daab971f58f60ef21bd45b1a0d517f4b /src/mbgl/style/layers/circle_layer_properties.hpp | |
parent | a48152a9811a856e467eff3e396a76a059558fb1 (diff) | |
download | qtlocation-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/layers/circle_layer_properties.hpp')
-rw-r--r-- | src/mbgl/style/layers/circle_layer_properties.hpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/mbgl/style/layers/circle_layer_properties.hpp b/src/mbgl/style/layers/circle_layer_properties.hpp index ef08e65455..17727c79eb 100644 --- a/src/mbgl/style/layers/circle_layer_properties.hpp +++ b/src/mbgl/style/layers/circle_layer_properties.hpp @@ -14,40 +14,28 @@ namespace mbgl { namespace style { -struct CircleRadius : DataDrivenPaintProperty<float, attributes::radius, uniforms::radius> { - static float defaultValue() { return 5; } +struct CircleBlur : DataDrivenPaintProperty<float, attributes::blur, uniforms::blur> { + static float defaultValue() { return 0; } }; struct CircleColor : DataDrivenPaintProperty<Color, attributes::color, uniforms::color> { static Color defaultValue() { return Color::black(); } }; -struct CircleBlur : DataDrivenPaintProperty<float, attributes::blur, uniforms::blur> { - static float defaultValue() { return 0; } -}; - struct CircleOpacity : DataDrivenPaintProperty<float, attributes::opacity, uniforms::opacity> { static float defaultValue() { return 1; } }; -struct CircleTranslate : PaintProperty<std::array<float, 2>> { - static std::array<float, 2> defaultValue() { return {{ 0, 0 }}; } -}; - -struct CircleTranslateAnchor : PaintProperty<TranslateAnchorType> { - static TranslateAnchorType defaultValue() { return TranslateAnchorType::Map; } +struct CirclePitchAlignment : PaintProperty<AlignmentType> { + static AlignmentType defaultValue() { return AlignmentType::Viewport; } }; struct CirclePitchScale : PaintProperty<CirclePitchScaleType> { static CirclePitchScaleType defaultValue() { return CirclePitchScaleType::Map; } }; -struct CirclePitchAlignment : PaintProperty<AlignmentType> { - static AlignmentType defaultValue() { return AlignmentType::Viewport; } -}; - -struct CircleStrokeWidth : DataDrivenPaintProperty<float, attributes::stroke_width, uniforms::stroke_width> { - static float defaultValue() { return 0; } +struct CircleRadius : DataDrivenPaintProperty<float, attributes::radius, uniforms::radius> { + static float defaultValue() { return 5; } }; struct CircleStrokeColor : DataDrivenPaintProperty<Color, attributes::stroke_color, uniforms::stroke_color> { @@ -58,18 +46,30 @@ struct CircleStrokeOpacity : DataDrivenPaintProperty<float, attributes::stroke_o static float defaultValue() { return 1; } }; +struct CircleStrokeWidth : DataDrivenPaintProperty<float, attributes::stroke_width, uniforms::stroke_width> { + static float defaultValue() { return 0; } +}; + +struct CircleTranslate : PaintProperty<std::array<float, 2>> { + static std::array<float, 2> defaultValue() { return {{ 0, 0 }}; } +}; + +struct CircleTranslateAnchor : PaintProperty<TranslateAnchorType> { + static TranslateAnchorType defaultValue() { return TranslateAnchorType::Map; } +}; + class CirclePaintProperties : public Properties< - CircleRadius, - CircleColor, CircleBlur, + CircleColor, CircleOpacity, - CircleTranslate, - CircleTranslateAnchor, - CirclePitchScale, CirclePitchAlignment, - CircleStrokeWidth, + CirclePitchScale, + CircleRadius, CircleStrokeColor, - CircleStrokeOpacity + CircleStrokeOpacity, + CircleStrokeWidth, + CircleTranslate, + CircleTranslateAnchor > {}; class CircleLayerProperties final : public LayerProperties { |