From 174d367699ad647cba46b8e521f25b436c33fee2 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 12 Jul 2016 19:01:29 +0300 Subject: [core] Prefer color aliases for default property values --- src/mbgl/style/layers/background_layer_properties.hpp | 2 +- src/mbgl/style/layers/circle_layer_properties.hpp | 2 +- src/mbgl/style/layers/fill_layer_properties.hpp | 2 +- src/mbgl/style/layers/line_layer_properties.hpp | 2 +- src/mbgl/style/layers/symbol_layer_properties.hpp | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mbgl/style/layers/background_layer_properties.hpp b/src/mbgl/style/layers/background_layer_properties.hpp index 6c5a7c57ca..78a35a4f0c 100644 --- a/src/mbgl/style/layers/background_layer_properties.hpp +++ b/src/mbgl/style/layers/background_layer_properties.hpp @@ -17,7 +17,7 @@ public: void cascade(const CascadeParameters&); bool recalculate(const CalculationParameters&); - PaintProperty backgroundColor { { 0, 0, 0, 1 } }; + PaintProperty backgroundColor { Color::black() }; PaintProperty backgroundPattern { "" }; PaintProperty backgroundOpacity { 1 }; }; diff --git a/src/mbgl/style/layers/circle_layer_properties.hpp b/src/mbgl/style/layers/circle_layer_properties.hpp index 227a67eb6b..0166bc8be4 100644 --- a/src/mbgl/style/layers/circle_layer_properties.hpp +++ b/src/mbgl/style/layers/circle_layer_properties.hpp @@ -18,7 +18,7 @@ public: bool recalculate(const CalculationParameters&); PaintProperty circleRadius { 5 }; - PaintProperty circleColor { { 0, 0, 0, 1 } }; + PaintProperty circleColor { Color::black() }; PaintProperty circleBlur { 0 }; PaintProperty circleOpacity { 1 }; PaintProperty> circleTranslate { {{ 0, 0 }} }; diff --git a/src/mbgl/style/layers/fill_layer_properties.hpp b/src/mbgl/style/layers/fill_layer_properties.hpp index 225fec4f4b..d12eb8d6f4 100644 --- a/src/mbgl/style/layers/fill_layer_properties.hpp +++ b/src/mbgl/style/layers/fill_layer_properties.hpp @@ -19,7 +19,7 @@ public: PaintProperty fillAntialias { true }; PaintProperty fillOpacity { 1 }; - PaintProperty fillColor { { 0, 0, 0, 1 } }; + PaintProperty fillColor { Color::black() }; PaintProperty fillOutlineColor { {} }; PaintProperty> fillTranslate { {{ 0, 0 }} }; PaintProperty fillTranslateAnchor { TranslateAnchorType::Map }; diff --git a/src/mbgl/style/layers/line_layer_properties.hpp b/src/mbgl/style/layers/line_layer_properties.hpp index e7dbddf442..b73e3f2ef2 100644 --- a/src/mbgl/style/layers/line_layer_properties.hpp +++ b/src/mbgl/style/layers/line_layer_properties.hpp @@ -28,7 +28,7 @@ public: bool recalculate(const CalculationParameters&); PaintProperty lineOpacity { 1 }; - PaintProperty lineColor { { 0, 0, 0, 1 } }; + PaintProperty lineColor { Color::black() }; PaintProperty> lineTranslate { {{ 0, 0 }} }; PaintProperty lineTranslateAnchor { TranslateAnchorType::Map }; PaintProperty lineWidth { 1 }; diff --git a/src/mbgl/style/layers/symbol_layer_properties.hpp b/src/mbgl/style/layers/symbol_layer_properties.hpp index a269969cb8..e4560ab486 100644 --- a/src/mbgl/style/layers/symbol_layer_properties.hpp +++ b/src/mbgl/style/layers/symbol_layer_properties.hpp @@ -58,15 +58,15 @@ public: bool recalculate(const CalculationParameters&); PaintProperty iconOpacity { 1 }; - PaintProperty iconColor { { 0, 0, 0, 1 } }; - PaintProperty iconHaloColor { { 0, 0, 0, 0 } }; + PaintProperty iconColor { Color::black() }; + PaintProperty iconHaloColor { {} }; PaintProperty iconHaloWidth { 0 }; PaintProperty iconHaloBlur { 0 }; PaintProperty> iconTranslate { {{ 0, 0 }} }; PaintProperty iconTranslateAnchor { TranslateAnchorType::Map }; PaintProperty textOpacity { 1 }; - PaintProperty textColor { { 0, 0, 0, 1 } }; - PaintProperty textHaloColor { { 0, 0, 0, 0 } }; + PaintProperty textColor { Color::black() }; + PaintProperty textHaloColor { {} }; PaintProperty textHaloWidth { 0 }; PaintProperty textHaloBlur { 0 }; PaintProperty> textTranslate { {{ 0, 0 }} }; -- cgit v1.2.1