summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-07-12 19:01:29 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-07-13 11:57:09 +0300
commit174d367699ad647cba46b8e521f25b436c33fee2 (patch)
tree7585ae05b2be0326225af66f5ff91013d6a01ac7 /src
parent06af750d236861e32d047f8cfdb0b766bd174f67 (diff)
downloadqtlocation-mapboxgl-174d367699ad647cba46b8e521f25b436c33fee2.tar.gz
[core] Prefer color aliases for default property values
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/layers/background_layer_properties.hpp2
-rw-r--r--src/mbgl/style/layers/circle_layer_properties.hpp2
-rw-r--r--src/mbgl/style/layers/fill_layer_properties.hpp2
-rw-r--r--src/mbgl/style/layers/line_layer_properties.hpp2
-rw-r--r--src/mbgl/style/layers/symbol_layer_properties.hpp8
5 files changed, 8 insertions, 8 deletions
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<Color> backgroundColor { { 0, 0, 0, 1 } };
+ PaintProperty<Color> backgroundColor { Color::black() };
PaintProperty<std::string, CrossFadedPropertyEvaluator> backgroundPattern { "" };
PaintProperty<float> 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<float> circleRadius { 5 };
- PaintProperty<Color> circleColor { { 0, 0, 0, 1 } };
+ PaintProperty<Color> circleColor { Color::black() };
PaintProperty<float> circleBlur { 0 };
PaintProperty<float> circleOpacity { 1 };
PaintProperty<std::array<float, 2>> 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<bool> fillAntialias { true };
PaintProperty<float> fillOpacity { 1 };
- PaintProperty<Color> fillColor { { 0, 0, 0, 1 } };
+ PaintProperty<Color> fillColor { Color::black() };
PaintProperty<Color> fillOutlineColor { {} };
PaintProperty<std::array<float, 2>> fillTranslate { {{ 0, 0 }} };
PaintProperty<TranslateAnchorType> 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<float> lineOpacity { 1 };
- PaintProperty<Color> lineColor { { 0, 0, 0, 1 } };
+ PaintProperty<Color> lineColor { Color::black() };
PaintProperty<std::array<float, 2>> lineTranslate { {{ 0, 0 }} };
PaintProperty<TranslateAnchorType> lineTranslateAnchor { TranslateAnchorType::Map };
PaintProperty<float> 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<float> iconOpacity { 1 };
- PaintProperty<Color> iconColor { { 0, 0, 0, 1 } };
- PaintProperty<Color> iconHaloColor { { 0, 0, 0, 0 } };
+ PaintProperty<Color> iconColor { Color::black() };
+ PaintProperty<Color> iconHaloColor { {} };
PaintProperty<float> iconHaloWidth { 0 };
PaintProperty<float> iconHaloBlur { 0 };
PaintProperty<std::array<float, 2>> iconTranslate { {{ 0, 0 }} };
PaintProperty<TranslateAnchorType> iconTranslateAnchor { TranslateAnchorType::Map };
PaintProperty<float> textOpacity { 1 };
- PaintProperty<Color> textColor { { 0, 0, 0, 1 } };
- PaintProperty<Color> textHaloColor { { 0, 0, 0, 0 } };
+ PaintProperty<Color> textColor { Color::black() };
+ PaintProperty<Color> textHaloColor { {} };
PaintProperty<float> textHaloWidth { 0 };
PaintProperty<float> textHaloBlur { 0 };
PaintProperty<std::array<float, 2>> textTranslate { {{ 0, 0 }} };