diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-04-03 12:27:14 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-04-05 11:49:17 +0200 |
commit | 3ceabcd3ec91dbd9458d3c5b78fb12c3182636e1 (patch) | |
tree | b8be2ac790afce844178a314b42683ab9d06f744 /src/mbgl/style/layers | |
parent | d7aaf83421261087a99d18d92eca9637c1bf72f8 (diff) | |
download | qtlocation-mapboxgl-3ceabcd3ec91dbd9458d3c5b78fb12c3182636e1.tar.gz |
[core] clang-tidy fixes
Diffstat (limited to 'src/mbgl/style/layers')
-rw-r--r-- | src/mbgl/style/layers/background_layer.cpp | 14 | ||||
-rw-r--r-- | src/mbgl/style/layers/circle_layer.cpp | 46 | ||||
-rw-r--r-- | src/mbgl/style/layers/fill_extrusion_layer.cpp | 34 | ||||
-rw-r--r-- | src/mbgl/style/layers/fill_layer.cpp | 30 | ||||
-rw-r--r-- | src/mbgl/style/layers/heatmap_layer.cpp | 22 | ||||
-rw-r--r-- | src/mbgl/style/layers/hillshade_layer.cpp | 26 | ||||
-rw-r--r-- | src/mbgl/style/layers/layer.cpp.ejs | 12 | ||||
-rw-r--r-- | src/mbgl/style/layers/line_layer.cpp | 64 | ||||
-rw-r--r-- | src/mbgl/style/layers/raster_layer.cpp | 34 | ||||
-rw-r--r-- | src/mbgl/style/layers/symbol_layer.cpp | 216 |
10 files changed, 249 insertions, 249 deletions
diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp index 89b367b632..8d2b1b144b 100644 --- a/src/mbgl/style/layers/background_layer.cpp +++ b/src/mbgl/style/layers/background_layer.cpp @@ -66,11 +66,11 @@ PropertyValue<Color> BackgroundLayer::getDefaultBackgroundColor() { return { Color::black() }; } -PropertyValue<Color> BackgroundLayer::getBackgroundColor() const { +const PropertyValue<Color>& BackgroundLayer::getBackgroundColor() const { return impl().paint.template get<BackgroundColor>().value; } -void BackgroundLayer::setBackgroundColor(PropertyValue<Color> value) { +void BackgroundLayer::setBackgroundColor(const PropertyValue<Color>& value) { if (value == getBackgroundColor()) return; auto impl_ = mutableImpl(); @@ -93,11 +93,11 @@ PropertyValue<std::string> BackgroundLayer::getDefaultBackgroundPattern() { return { "" }; } -PropertyValue<std::string> BackgroundLayer::getBackgroundPattern() const { +const PropertyValue<std::string>& BackgroundLayer::getBackgroundPattern() const { return impl().paint.template get<BackgroundPattern>().value; } -void BackgroundLayer::setBackgroundPattern(PropertyValue<std::string> value) { +void BackgroundLayer::setBackgroundPattern(const PropertyValue<std::string>& value) { if (value == getBackgroundPattern()) return; auto impl_ = mutableImpl(); @@ -120,11 +120,11 @@ PropertyValue<float> BackgroundLayer::getDefaultBackgroundOpacity() { return { 1 }; } -PropertyValue<float> BackgroundLayer::getBackgroundOpacity() const { +const PropertyValue<float>& BackgroundLayer::getBackgroundOpacity() const { return impl().paint.template get<BackgroundOpacity>().value; } -void BackgroundLayer::setBackgroundOpacity(PropertyValue<float> value) { +void BackgroundLayer::setBackgroundOpacity(const PropertyValue<float>& value) { if (value == getBackgroundOpacity()) return; auto impl_ = mutableImpl(); @@ -169,7 +169,7 @@ optional<Error> BackgroundLayer::setPaintProperty(const std::string& name, const return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::BackgroundColor) { diff --git a/src/mbgl/style/layers/circle_layer.cpp b/src/mbgl/style/layers/circle_layer.cpp index 18f9a62f74..f2e3649c5a 100644 --- a/src/mbgl/style/layers/circle_layer.cpp +++ b/src/mbgl/style/layers/circle_layer.cpp @@ -66,11 +66,11 @@ PropertyValue<float> CircleLayer::getDefaultCircleRadius() { return { 5 }; } -PropertyValue<float> CircleLayer::getCircleRadius() const { +const PropertyValue<float>& CircleLayer::getCircleRadius() const { return impl().paint.template get<CircleRadius>().value; } -void CircleLayer::setCircleRadius(PropertyValue<float> value) { +void CircleLayer::setCircleRadius(const PropertyValue<float>& value) { if (value == getCircleRadius()) return; auto impl_ = mutableImpl(); @@ -93,11 +93,11 @@ PropertyValue<Color> CircleLayer::getDefaultCircleColor() { return { Color::black() }; } -PropertyValue<Color> CircleLayer::getCircleColor() const { +const PropertyValue<Color>& CircleLayer::getCircleColor() const { return impl().paint.template get<CircleColor>().value; } -void CircleLayer::setCircleColor(PropertyValue<Color> value) { +void CircleLayer::setCircleColor(const PropertyValue<Color>& value) { if (value == getCircleColor()) return; auto impl_ = mutableImpl(); @@ -120,11 +120,11 @@ PropertyValue<float> CircleLayer::getDefaultCircleBlur() { return { 0 }; } -PropertyValue<float> CircleLayer::getCircleBlur() const { +const PropertyValue<float>& CircleLayer::getCircleBlur() const { return impl().paint.template get<CircleBlur>().value; } -void CircleLayer::setCircleBlur(PropertyValue<float> value) { +void CircleLayer::setCircleBlur(const PropertyValue<float>& value) { if (value == getCircleBlur()) return; auto impl_ = mutableImpl(); @@ -147,11 +147,11 @@ PropertyValue<float> CircleLayer::getDefaultCircleOpacity() { return { 1 }; } -PropertyValue<float> CircleLayer::getCircleOpacity() const { +const PropertyValue<float>& CircleLayer::getCircleOpacity() const { return impl().paint.template get<CircleOpacity>().value; } -void CircleLayer::setCircleOpacity(PropertyValue<float> value) { +void CircleLayer::setCircleOpacity(const PropertyValue<float>& value) { if (value == getCircleOpacity()) return; auto impl_ = mutableImpl(); @@ -174,11 +174,11 @@ PropertyValue<std::array<float, 2>> CircleLayer::getDefaultCircleTranslate() { return { {{ 0, 0 }} }; } -PropertyValue<std::array<float, 2>> CircleLayer::getCircleTranslate() const { +const PropertyValue<std::array<float, 2>>& CircleLayer::getCircleTranslate() const { return impl().paint.template get<CircleTranslate>().value; } -void CircleLayer::setCircleTranslate(PropertyValue<std::array<float, 2>> value) { +void CircleLayer::setCircleTranslate(const PropertyValue<std::array<float, 2>>& value) { if (value == getCircleTranslate()) return; auto impl_ = mutableImpl(); @@ -201,11 +201,11 @@ PropertyValue<TranslateAnchorType> CircleLayer::getDefaultCircleTranslateAnchor( return { TranslateAnchorType::Map }; } -PropertyValue<TranslateAnchorType> CircleLayer::getCircleTranslateAnchor() const { +const PropertyValue<TranslateAnchorType>& CircleLayer::getCircleTranslateAnchor() const { return impl().paint.template get<CircleTranslateAnchor>().value; } -void CircleLayer::setCircleTranslateAnchor(PropertyValue<TranslateAnchorType> value) { +void CircleLayer::setCircleTranslateAnchor(const PropertyValue<TranslateAnchorType>& value) { if (value == getCircleTranslateAnchor()) return; auto impl_ = mutableImpl(); @@ -228,11 +228,11 @@ PropertyValue<CirclePitchScaleType> CircleLayer::getDefaultCirclePitchScale() { return { CirclePitchScaleType::Map }; } -PropertyValue<CirclePitchScaleType> CircleLayer::getCirclePitchScale() const { +const PropertyValue<CirclePitchScaleType>& CircleLayer::getCirclePitchScale() const { return impl().paint.template get<CirclePitchScale>().value; } -void CircleLayer::setCirclePitchScale(PropertyValue<CirclePitchScaleType> value) { +void CircleLayer::setCirclePitchScale(const PropertyValue<CirclePitchScaleType>& value) { if (value == getCirclePitchScale()) return; auto impl_ = mutableImpl(); @@ -255,11 +255,11 @@ PropertyValue<AlignmentType> CircleLayer::getDefaultCirclePitchAlignment() { return { AlignmentType::Viewport }; } -PropertyValue<AlignmentType> CircleLayer::getCirclePitchAlignment() const { +const PropertyValue<AlignmentType>& CircleLayer::getCirclePitchAlignment() const { return impl().paint.template get<CirclePitchAlignment>().value; } -void CircleLayer::setCirclePitchAlignment(PropertyValue<AlignmentType> value) { +void CircleLayer::setCirclePitchAlignment(const PropertyValue<AlignmentType>& value) { if (value == getCirclePitchAlignment()) return; auto impl_ = mutableImpl(); @@ -282,11 +282,11 @@ PropertyValue<float> CircleLayer::getDefaultCircleStrokeWidth() { return { 0 }; } -PropertyValue<float> CircleLayer::getCircleStrokeWidth() const { +const PropertyValue<float>& CircleLayer::getCircleStrokeWidth() const { return impl().paint.template get<CircleStrokeWidth>().value; } -void CircleLayer::setCircleStrokeWidth(PropertyValue<float> value) { +void CircleLayer::setCircleStrokeWidth(const PropertyValue<float>& value) { if (value == getCircleStrokeWidth()) return; auto impl_ = mutableImpl(); @@ -309,11 +309,11 @@ PropertyValue<Color> CircleLayer::getDefaultCircleStrokeColor() { return { Color::black() }; } -PropertyValue<Color> CircleLayer::getCircleStrokeColor() const { +const PropertyValue<Color>& CircleLayer::getCircleStrokeColor() const { return impl().paint.template get<CircleStrokeColor>().value; } -void CircleLayer::setCircleStrokeColor(PropertyValue<Color> value) { +void CircleLayer::setCircleStrokeColor(const PropertyValue<Color>& value) { if (value == getCircleStrokeColor()) return; auto impl_ = mutableImpl(); @@ -336,11 +336,11 @@ PropertyValue<float> CircleLayer::getDefaultCircleStrokeOpacity() { return { 1 }; } -PropertyValue<float> CircleLayer::getCircleStrokeOpacity() const { +const PropertyValue<float>& CircleLayer::getCircleStrokeOpacity() const { return impl().paint.template get<CircleStrokeOpacity>().value; } -void CircleLayer::setCircleStrokeOpacity(PropertyValue<float> value) { +void CircleLayer::setCircleStrokeOpacity(const PropertyValue<float>& value) { if (value == getCircleStrokeOpacity()) return; auto impl_ = mutableImpl(); @@ -417,7 +417,7 @@ optional<Error> CircleLayer::setPaintProperty(const std::string& name, const Con return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::CircleRadius || property == Property::CircleBlur || property == Property::CircleOpacity || property == Property::CircleStrokeWidth || property == Property::CircleStrokeOpacity) { diff --git a/src/mbgl/style/layers/fill_extrusion_layer.cpp b/src/mbgl/style/layers/fill_extrusion_layer.cpp index 3bbaebfe6d..913f8e3127 100644 --- a/src/mbgl/style/layers/fill_extrusion_layer.cpp +++ b/src/mbgl/style/layers/fill_extrusion_layer.cpp @@ -66,11 +66,11 @@ PropertyValue<float> FillExtrusionLayer::getDefaultFillExtrusionOpacity() { return { 1 }; } -PropertyValue<float> FillExtrusionLayer::getFillExtrusionOpacity() const { +const PropertyValue<float>& FillExtrusionLayer::getFillExtrusionOpacity() const { return impl().paint.template get<FillExtrusionOpacity>().value; } -void FillExtrusionLayer::setFillExtrusionOpacity(PropertyValue<float> value) { +void FillExtrusionLayer::setFillExtrusionOpacity(const PropertyValue<float>& value) { if (value == getFillExtrusionOpacity()) return; auto impl_ = mutableImpl(); @@ -93,11 +93,11 @@ PropertyValue<Color> FillExtrusionLayer::getDefaultFillExtrusionColor() { return { Color::black() }; } -PropertyValue<Color> FillExtrusionLayer::getFillExtrusionColor() const { +const PropertyValue<Color>& FillExtrusionLayer::getFillExtrusionColor() const { return impl().paint.template get<FillExtrusionColor>().value; } -void FillExtrusionLayer::setFillExtrusionColor(PropertyValue<Color> value) { +void FillExtrusionLayer::setFillExtrusionColor(const PropertyValue<Color>& value) { if (value == getFillExtrusionColor()) return; auto impl_ = mutableImpl(); @@ -120,11 +120,11 @@ PropertyValue<std::array<float, 2>> FillExtrusionLayer::getDefaultFillExtrusionT return { {{ 0, 0 }} }; } -PropertyValue<std::array<float, 2>> FillExtrusionLayer::getFillExtrusionTranslate() const { +const PropertyValue<std::array<float, 2>>& FillExtrusionLayer::getFillExtrusionTranslate() const { return impl().paint.template get<FillExtrusionTranslate>().value; } -void FillExtrusionLayer::setFillExtrusionTranslate(PropertyValue<std::array<float, 2>> value) { +void FillExtrusionLayer::setFillExtrusionTranslate(const PropertyValue<std::array<float, 2>>& value) { if (value == getFillExtrusionTranslate()) return; auto impl_ = mutableImpl(); @@ -147,11 +147,11 @@ PropertyValue<TranslateAnchorType> FillExtrusionLayer::getDefaultFillExtrusionTr return { TranslateAnchorType::Map }; } -PropertyValue<TranslateAnchorType> FillExtrusionLayer::getFillExtrusionTranslateAnchor() const { +const PropertyValue<TranslateAnchorType>& FillExtrusionLayer::getFillExtrusionTranslateAnchor() const { return impl().paint.template get<FillExtrusionTranslateAnchor>().value; } -void FillExtrusionLayer::setFillExtrusionTranslateAnchor(PropertyValue<TranslateAnchorType> value) { +void FillExtrusionLayer::setFillExtrusionTranslateAnchor(const PropertyValue<TranslateAnchorType>& value) { if (value == getFillExtrusionTranslateAnchor()) return; auto impl_ = mutableImpl(); @@ -174,11 +174,11 @@ PropertyValue<std::string> FillExtrusionLayer::getDefaultFillExtrusionPattern() return { "" }; } -PropertyValue<std::string> FillExtrusionLayer::getFillExtrusionPattern() const { +const PropertyValue<std::string>& FillExtrusionLayer::getFillExtrusionPattern() const { return impl().paint.template get<FillExtrusionPattern>().value; } -void FillExtrusionLayer::setFillExtrusionPattern(PropertyValue<std::string> value) { +void FillExtrusionLayer::setFillExtrusionPattern(const PropertyValue<std::string>& value) { if (value == getFillExtrusionPattern()) return; auto impl_ = mutableImpl(); @@ -201,11 +201,11 @@ PropertyValue<float> FillExtrusionLayer::getDefaultFillExtrusionHeight() { return { 0 }; } -PropertyValue<float> FillExtrusionLayer::getFillExtrusionHeight() const { +const PropertyValue<float>& FillExtrusionLayer::getFillExtrusionHeight() const { return impl().paint.template get<FillExtrusionHeight>().value; } -void FillExtrusionLayer::setFillExtrusionHeight(PropertyValue<float> value) { +void FillExtrusionLayer::setFillExtrusionHeight(const PropertyValue<float>& value) { if (value == getFillExtrusionHeight()) return; auto impl_ = mutableImpl(); @@ -228,11 +228,11 @@ PropertyValue<float> FillExtrusionLayer::getDefaultFillExtrusionBase() { return { 0 }; } -PropertyValue<float> FillExtrusionLayer::getFillExtrusionBase() const { +const PropertyValue<float>& FillExtrusionLayer::getFillExtrusionBase() const { return impl().paint.template get<FillExtrusionBase>().value; } -void FillExtrusionLayer::setFillExtrusionBase(PropertyValue<float> value) { +void FillExtrusionLayer::setFillExtrusionBase(const PropertyValue<float>& value) { if (value == getFillExtrusionBase()) return; auto impl_ = mutableImpl(); @@ -255,11 +255,11 @@ PropertyValue<bool> FillExtrusionLayer::getDefaultFillExtrusionVerticalGradient( return { true }; } -PropertyValue<bool> FillExtrusionLayer::getFillExtrusionVerticalGradient() const { +const PropertyValue<bool>& FillExtrusionLayer::getFillExtrusionVerticalGradient() const { return impl().paint.template get<FillExtrusionVerticalGradient>().value; } -void FillExtrusionLayer::setFillExtrusionVerticalGradient(PropertyValue<bool> value) { +void FillExtrusionLayer::setFillExtrusionVerticalGradient(const PropertyValue<bool>& value) { if (value == getFillExtrusionVerticalGradient()) return; auto impl_ = mutableImpl(); @@ -324,7 +324,7 @@ optional<Error> FillExtrusionLayer::setPaintProperty(const std::string& name, co return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::FillExtrusionOpacity) { diff --git a/src/mbgl/style/layers/fill_layer.cpp b/src/mbgl/style/layers/fill_layer.cpp index 6f3c163825..afcb2cae37 100644 --- a/src/mbgl/style/layers/fill_layer.cpp +++ b/src/mbgl/style/layers/fill_layer.cpp @@ -66,11 +66,11 @@ PropertyValue<bool> FillLayer::getDefaultFillAntialias() { return { true }; } -PropertyValue<bool> FillLayer::getFillAntialias() const { +const PropertyValue<bool>& FillLayer::getFillAntialias() const { return impl().paint.template get<FillAntialias>().value; } -void FillLayer::setFillAntialias(PropertyValue<bool> value) { +void FillLayer::setFillAntialias(const PropertyValue<bool>& value) { if (value == getFillAntialias()) return; auto impl_ = mutableImpl(); @@ -93,11 +93,11 @@ PropertyValue<float> FillLayer::getDefaultFillOpacity() { return { 1 }; } -PropertyValue<float> FillLayer::getFillOpacity() const { +const PropertyValue<float>& FillLayer::getFillOpacity() const { return impl().paint.template get<FillOpacity>().value; } -void FillLayer::setFillOpacity(PropertyValue<float> value) { +void FillLayer::setFillOpacity(const PropertyValue<float>& value) { if (value == getFillOpacity()) return; auto impl_ = mutableImpl(); @@ -120,11 +120,11 @@ PropertyValue<Color> FillLayer::getDefaultFillColor() { return { Color::black() }; } -PropertyValue<Color> FillLayer::getFillColor() const { +const PropertyValue<Color>& FillLayer::getFillColor() const { return impl().paint.template get<FillColor>().value; } -void FillLayer::setFillColor(PropertyValue<Color> value) { +void FillLayer::setFillColor(const PropertyValue<Color>& value) { if (value == getFillColor()) return; auto impl_ = mutableImpl(); @@ -147,11 +147,11 @@ PropertyValue<Color> FillLayer::getDefaultFillOutlineColor() { return { {} }; } -PropertyValue<Color> FillLayer::getFillOutlineColor() const { +const PropertyValue<Color>& FillLayer::getFillOutlineColor() const { return impl().paint.template get<FillOutlineColor>().value; } -void FillLayer::setFillOutlineColor(PropertyValue<Color> value) { +void FillLayer::setFillOutlineColor(const PropertyValue<Color>& value) { if (value == getFillOutlineColor()) return; auto impl_ = mutableImpl(); @@ -174,11 +174,11 @@ PropertyValue<std::array<float, 2>> FillLayer::getDefaultFillTranslate() { return { {{ 0, 0 }} }; } -PropertyValue<std::array<float, 2>> FillLayer::getFillTranslate() const { +const PropertyValue<std::array<float, 2>>& FillLayer::getFillTranslate() const { return impl().paint.template get<FillTranslate>().value; } -void FillLayer::setFillTranslate(PropertyValue<std::array<float, 2>> value) { +void FillLayer::setFillTranslate(const PropertyValue<std::array<float, 2>>& value) { if (value == getFillTranslate()) return; auto impl_ = mutableImpl(); @@ -201,11 +201,11 @@ PropertyValue<TranslateAnchorType> FillLayer::getDefaultFillTranslateAnchor() { return { TranslateAnchorType::Map }; } -PropertyValue<TranslateAnchorType> FillLayer::getFillTranslateAnchor() const { +const PropertyValue<TranslateAnchorType>& FillLayer::getFillTranslateAnchor() const { return impl().paint.template get<FillTranslateAnchor>().value; } -void FillLayer::setFillTranslateAnchor(PropertyValue<TranslateAnchorType> value) { +void FillLayer::setFillTranslateAnchor(const PropertyValue<TranslateAnchorType>& value) { if (value == getFillTranslateAnchor()) return; auto impl_ = mutableImpl(); @@ -228,11 +228,11 @@ PropertyValue<std::string> FillLayer::getDefaultFillPattern() { return { "" }; } -PropertyValue<std::string> FillLayer::getFillPattern() const { +const PropertyValue<std::string>& FillLayer::getFillPattern() const { return impl().paint.template get<FillPattern>().value; } -void FillLayer::setFillPattern(PropertyValue<std::string> value) { +void FillLayer::setFillPattern(const PropertyValue<std::string>& value) { if (value == getFillPattern()) return; auto impl_ = mutableImpl(); @@ -293,7 +293,7 @@ optional<Error> FillLayer::setPaintProperty(const std::string& name, const Conve return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::FillAntialias) { diff --git a/src/mbgl/style/layers/heatmap_layer.cpp b/src/mbgl/style/layers/heatmap_layer.cpp index d548ee9b74..9e0fe93557 100644 --- a/src/mbgl/style/layers/heatmap_layer.cpp +++ b/src/mbgl/style/layers/heatmap_layer.cpp @@ -66,11 +66,11 @@ PropertyValue<float> HeatmapLayer::getDefaultHeatmapRadius() { return { 30 }; } -PropertyValue<float> HeatmapLayer::getHeatmapRadius() const { +const PropertyValue<float>& HeatmapLayer::getHeatmapRadius() const { return impl().paint.template get<HeatmapRadius>().value; } -void HeatmapLayer::setHeatmapRadius(PropertyValue<float> value) { +void HeatmapLayer::setHeatmapRadius(const PropertyValue<float>& value) { if (value == getHeatmapRadius()) return; auto impl_ = mutableImpl(); @@ -93,11 +93,11 @@ PropertyValue<float> HeatmapLayer::getDefaultHeatmapWeight() { return { 1 }; } -PropertyValue<float> HeatmapLayer::getHeatmapWeight() const { +const PropertyValue<float>& HeatmapLayer::getHeatmapWeight() const { return impl().paint.template get<HeatmapWeight>().value; } -void HeatmapLayer::setHeatmapWeight(PropertyValue<float> value) { +void HeatmapLayer::setHeatmapWeight(const PropertyValue<float>& value) { if (value == getHeatmapWeight()) return; auto impl_ = mutableImpl(); @@ -120,11 +120,11 @@ PropertyValue<float> HeatmapLayer::getDefaultHeatmapIntensity() { return { 1 }; } -PropertyValue<float> HeatmapLayer::getHeatmapIntensity() const { +const PropertyValue<float>& HeatmapLayer::getHeatmapIntensity() const { return impl().paint.template get<HeatmapIntensity>().value; } -void HeatmapLayer::setHeatmapIntensity(PropertyValue<float> value) { +void HeatmapLayer::setHeatmapIntensity(const PropertyValue<float>& value) { if (value == getHeatmapIntensity()) return; auto impl_ = mutableImpl(); @@ -149,11 +149,11 @@ ColorRampPropertyValue HeatmapLayer::getDefaultHeatmapColor() { return *conversion::convertJSON<ColorRampPropertyValue>(rawValue, error); } -ColorRampPropertyValue HeatmapLayer::getHeatmapColor() const { +const ColorRampPropertyValue& HeatmapLayer::getHeatmapColor() const { return impl().paint.template get<HeatmapColor>().value; } -void HeatmapLayer::setHeatmapColor(ColorRampPropertyValue value) { +void HeatmapLayer::setHeatmapColor(const ColorRampPropertyValue& value) { if (value == getHeatmapColor()) return; auto impl_ = mutableImpl(); @@ -176,11 +176,11 @@ PropertyValue<float> HeatmapLayer::getDefaultHeatmapOpacity() { return { 1 }; } -PropertyValue<float> HeatmapLayer::getHeatmapOpacity() const { +const PropertyValue<float>& HeatmapLayer::getHeatmapOpacity() const { return impl().paint.template get<HeatmapOpacity>().value; } -void HeatmapLayer::setHeatmapOpacity(PropertyValue<float> value) { +void HeatmapLayer::setHeatmapOpacity(const PropertyValue<float>& value) { if (value == getHeatmapOpacity()) return; auto impl_ = mutableImpl(); @@ -233,7 +233,7 @@ optional<Error> HeatmapLayer::setPaintProperty(const std::string& name, const Co return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::HeatmapRadius || property == Property::HeatmapWeight) { diff --git a/src/mbgl/style/layers/hillshade_layer.cpp b/src/mbgl/style/layers/hillshade_layer.cpp index 49d3217a3b..ac26e331fc 100644 --- a/src/mbgl/style/layers/hillshade_layer.cpp +++ b/src/mbgl/style/layers/hillshade_layer.cpp @@ -66,11 +66,11 @@ PropertyValue<float> HillshadeLayer::getDefaultHillshadeIlluminationDirection() return { 335 }; } -PropertyValue<float> HillshadeLayer::getHillshadeIlluminationDirection() const { +const PropertyValue<float>& HillshadeLayer::getHillshadeIlluminationDirection() const { return impl().paint.template get<HillshadeIlluminationDirection>().value; } -void HillshadeLayer::setHillshadeIlluminationDirection(PropertyValue<float> value) { +void HillshadeLayer::setHillshadeIlluminationDirection(const PropertyValue<float>& value) { if (value == getHillshadeIlluminationDirection()) return; auto impl_ = mutableImpl(); @@ -93,11 +93,11 @@ PropertyValue<HillshadeIlluminationAnchorType> HillshadeLayer::getDefaultHillsha return { HillshadeIlluminationAnchorType::Viewport }; } -PropertyValue<HillshadeIlluminationAnchorType> HillshadeLayer::getHillshadeIlluminationAnchor() const { +const PropertyValue<HillshadeIlluminationAnchorType>& HillshadeLayer::getHillshadeIlluminationAnchor() const { return impl().paint.template get<HillshadeIlluminationAnchor>().value; } -void HillshadeLayer::setHillshadeIlluminationAnchor(PropertyValue<HillshadeIlluminationAnchorType> value) { +void HillshadeLayer::setHillshadeIlluminationAnchor(const PropertyValue<HillshadeIlluminationAnchorType>& value) { if (value == getHillshadeIlluminationAnchor()) return; auto impl_ = mutableImpl(); @@ -120,11 +120,11 @@ PropertyValue<float> HillshadeLayer::getDefaultHillshadeExaggeration() { return { 0.5 }; } -PropertyValue<float> HillshadeLayer::getHillshadeExaggeration() const { +const PropertyValue<float>& HillshadeLayer::getHillshadeExaggeration() const { return impl().paint.template get<HillshadeExaggeration>().value; } -void HillshadeLayer::setHillshadeExaggeration(PropertyValue<float> value) { +void HillshadeLayer::setHillshadeExaggeration(const PropertyValue<float>& value) { if (value == getHillshadeExaggeration()) return; auto impl_ = mutableImpl(); @@ -147,11 +147,11 @@ PropertyValue<Color> HillshadeLayer::getDefaultHillshadeShadowColor() { return { Color::black() }; } -PropertyValue<Color> HillshadeLayer::getHillshadeShadowColor() const { +const PropertyValue<Color>& HillshadeLayer::getHillshadeShadowColor() const { return impl().paint.template get<HillshadeShadowColor>().value; } -void HillshadeLayer::setHillshadeShadowColor(PropertyValue<Color> value) { +void HillshadeLayer::setHillshadeShadowColor(const PropertyValue<Color>& value) { if (value == getHillshadeShadowColor()) return; auto impl_ = mutableImpl(); @@ -174,11 +174,11 @@ PropertyValue<Color> HillshadeLayer::getDefaultHillshadeHighlightColor() { return { Color::white() }; } -PropertyValue<Color> HillshadeLayer::getHillshadeHighlightColor() const { +const PropertyValue<Color>& HillshadeLayer::getHillshadeHighlightColor() const { return impl().paint.template get<HillshadeHighlightColor>().value; } -void HillshadeLayer::setHillshadeHighlightColor(PropertyValue<Color> value) { +void HillshadeLayer::setHillshadeHighlightColor(const PropertyValue<Color>& value) { if (value == getHillshadeHighlightColor()) return; auto impl_ = mutableImpl(); @@ -201,11 +201,11 @@ PropertyValue<Color> HillshadeLayer::getDefaultHillshadeAccentColor() { return { Color::black() }; } -PropertyValue<Color> HillshadeLayer::getHillshadeAccentColor() const { +const PropertyValue<Color>& HillshadeLayer::getHillshadeAccentColor() const { return impl().paint.template get<HillshadeAccentColor>().value; } -void HillshadeLayer::setHillshadeAccentColor(PropertyValue<Color> value) { +void HillshadeLayer::setHillshadeAccentColor(const PropertyValue<Color>& value) { if (value == getHillshadeAccentColor()) return; auto impl_ = mutableImpl(); @@ -262,7 +262,7 @@ optional<Error> HillshadeLayer::setPaintProperty(const std::string& name, const return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::HillshadeIlluminationDirection || property == Property::HillshadeExaggeration) { diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs index 201189c849..107c3cb527 100644 --- a/src/mbgl/style/layers/layer.cpp.ejs +++ b/src/mbgl/style/layers/layer.cpp.ejs @@ -118,11 +118,11 @@ void <%- camelize(type) %>Layer::Impl::stringifyLayout(rapidjson::Writer<rapidjs return <%- camelize(property.name) %>::defaultValue(); } -<%- propertyValueType(property) %> <%- camelize(type) %>Layer::get<%- camelize(property.name) %>() const { +const <%- propertyValueType(property) %>& <%- camelize(type) %>Layer::get<%- camelize(property.name) %>() const { return impl().layout.get<<%- camelize(property.name) %>>(); } -void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(<%- propertyValueType(property) %> value) { +void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(const <%- propertyValueType(property) %>& value) { if (value == get<%- camelize(property.name) %>()) return; auto impl_ = mutableImpl(); @@ -144,11 +144,11 @@ void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(<%- propertyV <% } -%> } -<%- propertyValueType(property) %> <%- camelize(type) %>Layer::get<%- camelize(property.name) %>() const { +const <%- propertyValueType(property) %>& <%- camelize(type) %>Layer::get<%- camelize(property.name) %>() const { return impl().paint.template get<<%- camelize(property.name) %>>().value; } -void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(<%- propertyValueType(property) %> value) { +void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(const <%- propertyValueType(property) %>& value) { if (value == get<%- camelize(property.name) %>()) return; auto impl_ = mutableImpl(); @@ -193,7 +193,7 @@ optional<Error> <%- camelize(type) %>Layer::setPaintProperty(const std::string& return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); <% const paintConversions = {}; @@ -260,7 +260,7 @@ optional<Error> <%- camelize(type) %>Layer::setLayoutProperty(const std::string& return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); <% const layoutConversions = {}; diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp index 0a20762697..d52a552605 100644 --- a/src/mbgl/style/layers/line_layer.cpp +++ b/src/mbgl/style/layers/line_layer.cpp @@ -64,11 +64,11 @@ PropertyValue<LineCapType> LineLayer::getDefaultLineCap() { return LineCap::defaultValue(); } -PropertyValue<LineCapType> LineLayer::getLineCap() const { +const PropertyValue<LineCapType>& LineLayer::getLineCap() const { return impl().layout.get<LineCap>(); } -void LineLayer::setLineCap(PropertyValue<LineCapType> value) { +void LineLayer::setLineCap(const PropertyValue<LineCapType>& value) { if (value == getLineCap()) return; auto impl_ = mutableImpl(); @@ -80,11 +80,11 @@ PropertyValue<LineJoinType> LineLayer::getDefaultLineJoin() { return LineJoin::defaultValue(); } -PropertyValue<LineJoinType> LineLayer::getLineJoin() const { +const PropertyValue<LineJoinType>& LineLayer::getLineJoin() const { return impl().layout.get<LineJoin>(); } -void LineLayer::setLineJoin(PropertyValue<LineJoinType> value) { +void LineLayer::setLineJoin(const PropertyValue<LineJoinType>& value) { if (value == getLineJoin()) return; auto impl_ = mutableImpl(); @@ -96,11 +96,11 @@ PropertyValue<float> LineLayer::getDefaultLineMiterLimit() { return LineMiterLimit::defaultValue(); } -PropertyValue<float> LineLayer::getLineMiterLimit() const { +const PropertyValue<float>& LineLayer::getLineMiterLimit() const { return impl().layout.get<LineMiterLimit>(); } -void LineLayer::setLineMiterLimit(PropertyValue<float> value) { +void LineLayer::setLineMiterLimit(const PropertyValue<float>& value) { if (value == getLineMiterLimit()) return; auto impl_ = mutableImpl(); @@ -112,11 +112,11 @@ PropertyValue<float> LineLayer::getDefaultLineRoundLimit() { return LineRoundLimit::defaultValue(); } -PropertyValue<float> LineLayer::getLineRoundLimit() const { +const PropertyValue<float>& LineLayer::getLineRoundLimit() const { return impl().layout.get<LineRoundLimit>(); } -void LineLayer::setLineRoundLimit(PropertyValue<float> value) { +void LineLayer::setLineRoundLimit(const PropertyValue<float>& value) { if (value == getLineRoundLimit()) return; auto impl_ = mutableImpl(); @@ -131,11 +131,11 @@ PropertyValue<float> LineLayer::getDefaultLineOpacity() { return { 1 }; } -PropertyValue<float> LineLayer::getLineOpacity() const { +const PropertyValue<float>& LineLayer::getLineOpacity() const { return impl().paint.template get<LineOpacity>().value; } -void LineLayer::setLineOpacity(PropertyValue<float> value) { +void LineLayer::setLineOpacity(const PropertyValue<float>& value) { if (value == getLineOpacity()) return; auto impl_ = mutableImpl(); @@ -158,11 +158,11 @@ PropertyValue<Color> LineLayer::getDefaultLineColor() { return { Color::black() }; } -PropertyValue<Color> LineLayer::getLineColor() const { +const PropertyValue<Color>& LineLayer::getLineColor() const { return impl().paint.template get<LineColor>().value; } -void LineLayer::setLineColor(PropertyValue<Color> value) { +void LineLayer::setLineColor(const PropertyValue<Color>& value) { if (value == getLineColor()) return; auto impl_ = mutableImpl(); @@ -185,11 +185,11 @@ PropertyValue<std::array<float, 2>> LineLayer::getDefaultLineTranslate() { return { {{ 0, 0 }} }; } -PropertyValue<std::array<float, 2>> LineLayer::getLineTranslate() const { +const PropertyValue<std::array<float, 2>>& LineLayer::getLineTranslate() const { return impl().paint.template get<LineTranslate>().value; } -void LineLayer::setLineTranslate(PropertyValue<std::array<float, 2>> value) { +void LineLayer::setLineTranslate(const PropertyValue<std::array<float, 2>>& value) { if (value == getLineTranslate()) return; auto impl_ = mutableImpl(); @@ -212,11 +212,11 @@ PropertyValue<TranslateAnchorType> LineLayer::getDefaultLineTranslateAnchor() { return { TranslateAnchorType::Map }; } -PropertyValue<TranslateAnchorType> LineLayer::getLineTranslateAnchor() const { +const PropertyValue<TranslateAnchorType>& LineLayer::getLineTranslateAnchor() const { return impl().paint.template get<LineTranslateAnchor>().value; } -void LineLayer::setLineTranslateAnchor(PropertyValue<TranslateAnchorType> value) { +void LineLayer::setLineTranslateAnchor(const PropertyValue<TranslateAnchorType>& value) { if (value == getLineTranslateAnchor()) return; auto impl_ = mutableImpl(); @@ -239,11 +239,11 @@ PropertyValue<float> LineLayer::getDefaultLineWidth() { return { 1 }; } -PropertyValue<float> LineLayer::getLineWidth() const { +const PropertyValue<float>& LineLayer::getLineWidth() const { return impl().paint.template get<LineWidth>().value; } -void LineLayer::setLineWidth(PropertyValue<float> value) { +void LineLayer::setLineWidth(const PropertyValue<float>& value) { if (value == getLineWidth()) return; auto impl_ = mutableImpl(); @@ -267,11 +267,11 @@ PropertyValue<float> LineLayer::getDefaultLineGapWidth() { return { 0 }; } -PropertyValue<float> LineLayer::getLineGapWidth() const { +const PropertyValue<float>& LineLayer::getLineGapWidth() const { return impl().paint.template get<LineGapWidth>().value; } -void LineLayer::setLineGapWidth(PropertyValue<float> value) { +void LineLayer::setLineGapWidth(const PropertyValue<float>& value) { if (value == getLineGapWidth()) return; auto impl_ = mutableImpl(); @@ -294,11 +294,11 @@ PropertyValue<float> LineLayer::getDefaultLineOffset() { return { 0 }; } -PropertyValue<float> LineLayer::getLineOffset() const { +const PropertyValue<float>& LineLayer::getLineOffset() const { return impl().paint.template get<LineOffset>().value; } -void LineLayer::setLineOffset(PropertyValue<float> value) { +void LineLayer::setLineOffset(const PropertyValue<float>& value) { if (value == getLineOffset()) return; auto impl_ = mutableImpl(); @@ -321,11 +321,11 @@ PropertyValue<float> LineLayer::getDefaultLineBlur() { return { 0 }; } -PropertyValue<float> LineLayer::getLineBlur() const { +const PropertyValue<float>& LineLayer::getLineBlur() const { return impl().paint.template get<LineBlur>().value; } -void LineLayer::setLineBlur(PropertyValue<float> value) { +void LineLayer::setLineBlur(const PropertyValue<float>& value) { if (value == getLineBlur()) return; auto impl_ = mutableImpl(); @@ -348,11 +348,11 @@ PropertyValue<std::vector<float>> LineLayer::getDefaultLineDasharray() { return { { } }; } -PropertyValue<std::vector<float>> LineLayer::getLineDasharray() const { +const PropertyValue<std::vector<float>>& LineLayer::getLineDasharray() const { return impl().paint.template get<LineDasharray>().value; } -void LineLayer::setLineDasharray(PropertyValue<std::vector<float>> value) { +void LineLayer::setLineDasharray(const PropertyValue<std::vector<float>>& value) { if (value == getLineDasharray()) return; auto impl_ = mutableImpl(); @@ -375,11 +375,11 @@ PropertyValue<std::string> LineLayer::getDefaultLinePattern() { return { "" }; } -PropertyValue<std::string> LineLayer::getLinePattern() const { +const PropertyValue<std::string>& LineLayer::getLinePattern() const { return impl().paint.template get<LinePattern>().value; } -void LineLayer::setLinePattern(PropertyValue<std::string> value) { +void LineLayer::setLinePattern(const PropertyValue<std::string>& value) { if (value == getLinePattern()) return; auto impl_ = mutableImpl(); @@ -402,11 +402,11 @@ ColorRampPropertyValue LineLayer::getDefaultLineGradient() { return { {} }; } -ColorRampPropertyValue LineLayer::getLineGradient() const { +const ColorRampPropertyValue& LineLayer::getLineGradient() const { return impl().paint.template get<LineGradient>().value; } -void LineLayer::setLineGradient(ColorRampPropertyValue value) { +void LineLayer::setLineGradient(const ColorRampPropertyValue& value) { if (value == getLineGradient()) return; auto impl_ = mutableImpl(); @@ -483,7 +483,7 @@ optional<Error> LineLayer::setPaintProperty(const std::string& name, const Conve return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::LineOpacity || property == Property::LineWidth || property == Property::LineGapWidth || property == Property::LineOffset || property == Property::LineBlur) { @@ -680,7 +680,7 @@ optional<Error> LineLayer::setLayoutProperty(const std::string& name, const Conv return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::LineCap) { diff --git a/src/mbgl/style/layers/raster_layer.cpp b/src/mbgl/style/layers/raster_layer.cpp index b0820456e1..dc7dd4a74f 100644 --- a/src/mbgl/style/layers/raster_layer.cpp +++ b/src/mbgl/style/layers/raster_layer.cpp @@ -66,11 +66,11 @@ PropertyValue<float> RasterLayer::getDefaultRasterOpacity() { return { 1 }; } -PropertyValue<float> RasterLayer::getRasterOpacity() const { +const PropertyValue<float>& RasterLayer::getRasterOpacity() const { return impl().paint.template get<RasterOpacity>().value; } -void RasterLayer::setRasterOpacity(PropertyValue<float> value) { +void RasterLayer::setRasterOpacity(const PropertyValue<float>& value) { if (value == getRasterOpacity()) return; auto impl_ = mutableImpl(); @@ -93,11 +93,11 @@ PropertyValue<float> RasterLayer::getDefaultRasterHueRotate() { return { 0 }; } -PropertyValue<float> RasterLayer::getRasterHueRotate() const { +const PropertyValue<float>& RasterLayer::getRasterHueRotate() const { return impl().paint.template get<RasterHueRotate>().value; } -void RasterLayer::setRasterHueRotate(PropertyValue<float> value) { +void RasterLayer::setRasterHueRotate(const PropertyValue<float>& value) { if (value == getRasterHueRotate()) return; auto impl_ = mutableImpl(); @@ -120,11 +120,11 @@ PropertyValue<float> RasterLayer::getDefaultRasterBrightnessMin() { return { 0 }; } -PropertyValue<float> RasterLayer::getRasterBrightnessMin() const { +const PropertyValue<float>& RasterLayer::getRasterBrightnessMin() const { return impl().paint.template get<RasterBrightnessMin>().value; } -void RasterLayer::setRasterBrightnessMin(PropertyValue<float> value) { +void RasterLayer::setRasterBrightnessMin(const PropertyValue<float>& value) { if (value == getRasterBrightnessMin()) return; auto impl_ = mutableImpl(); @@ -147,11 +147,11 @@ PropertyValue<float> RasterLayer::getDefaultRasterBrightnessMax() { return { 1 }; } -PropertyValue<float> RasterLayer::getRasterBrightnessMax() const { +const PropertyValue<float>& RasterLayer::getRasterBrightnessMax() const { return impl().paint.template get<RasterBrightnessMax>().value; } -void RasterLayer::setRasterBrightnessMax(PropertyValue<float> value) { +void RasterLayer::setRasterBrightnessMax(const PropertyValue<float>& value) { if (value == getRasterBrightnessMax()) return; auto impl_ = mutableImpl(); @@ -174,11 +174,11 @@ PropertyValue<float> RasterLayer::getDefaultRasterSaturation() { return { 0 }; } -PropertyValue<float> RasterLayer::getRasterSaturation() const { +const PropertyValue<float>& RasterLayer::getRasterSaturation() const { return impl().paint.template get<RasterSaturation>().value; } -void RasterLayer::setRasterSaturation(PropertyValue<float> value) { +void RasterLayer::setRasterSaturation(const PropertyValue<float>& value) { if (value == getRasterSaturation()) return; auto impl_ = mutableImpl(); @@ -201,11 +201,11 @@ PropertyValue<float> RasterLayer::getDefaultRasterContrast() { return { 0 }; } -PropertyValue<float> RasterLayer::getRasterContrast() const { +const PropertyValue<float>& RasterLayer::getRasterContrast() const { return impl().paint.template get<RasterContrast>().value; } -void RasterLayer::setRasterContrast(PropertyValue<float> value) { +void RasterLayer::setRasterContrast(const PropertyValue<float>& value) { if (value == getRasterContrast()) return; auto impl_ = mutableImpl(); @@ -228,11 +228,11 @@ PropertyValue<RasterResamplingType> RasterLayer::getDefaultRasterResampling() { return { RasterResamplingType::Linear }; } -PropertyValue<RasterResamplingType> RasterLayer::getRasterResampling() const { +const PropertyValue<RasterResamplingType>& RasterLayer::getRasterResampling() const { return impl().paint.template get<RasterResampling>().value; } -void RasterLayer::setRasterResampling(PropertyValue<RasterResamplingType> value) { +void RasterLayer::setRasterResampling(const PropertyValue<RasterResamplingType>& value) { if (value == getRasterResampling()) return; auto impl_ = mutableImpl(); @@ -255,11 +255,11 @@ PropertyValue<float> RasterLayer::getDefaultRasterFadeDuration() { return { 300 }; } -PropertyValue<float> RasterLayer::getRasterFadeDuration() const { +const PropertyValue<float>& RasterLayer::getRasterFadeDuration() const { return impl().paint.template get<RasterFadeDuration>().value; } -void RasterLayer::setRasterFadeDuration(PropertyValue<float> value) { +void RasterLayer::setRasterFadeDuration(const PropertyValue<float>& value) { if (value == getRasterFadeDuration()) return; auto impl_ = mutableImpl(); @@ -324,7 +324,7 @@ optional<Error> RasterLayer::setPaintProperty(const std::string& name, const Con return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::RasterOpacity || property == Property::RasterHueRotate || property == Property::RasterBrightnessMin || property == Property::RasterBrightnessMax || property == Property::RasterSaturation || property == Property::RasterContrast || property == Property::RasterFadeDuration) { diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp index 1c56888f73..c8d7816180 100644 --- a/src/mbgl/style/layers/symbol_layer.cpp +++ b/src/mbgl/style/layers/symbol_layer.cpp @@ -64,11 +64,11 @@ PropertyValue<SymbolPlacementType> SymbolLayer::getDefaultSymbolPlacement() { return SymbolPlacement::defaultValue(); } -PropertyValue<SymbolPlacementType> SymbolLayer::getSymbolPlacement() const { +const PropertyValue<SymbolPlacementType>& SymbolLayer::getSymbolPlacement() const { return impl().layout.get<SymbolPlacement>(); } -void SymbolLayer::setSymbolPlacement(PropertyValue<SymbolPlacementType> value) { +void SymbolLayer::setSymbolPlacement(const PropertyValue<SymbolPlacementType>& value) { if (value == getSymbolPlacement()) return; auto impl_ = mutableImpl(); @@ -80,11 +80,11 @@ PropertyValue<float> SymbolLayer::getDefaultSymbolSpacing() { return SymbolSpacing::defaultValue(); } -PropertyValue<float> SymbolLayer::getSymbolSpacing() const { +const PropertyValue<float>& SymbolLayer::getSymbolSpacing() const { return impl().layout.get<SymbolSpacing>(); } -void SymbolLayer::setSymbolSpacing(PropertyValue<float> value) { +void SymbolLayer::setSymbolSpacing(const PropertyValue<float>& value) { if (value == getSymbolSpacing()) return; auto impl_ = mutableImpl(); @@ -96,11 +96,11 @@ PropertyValue<bool> SymbolLayer::getDefaultSymbolAvoidEdges() { return SymbolAvoidEdges::defaultValue(); } -PropertyValue<bool> SymbolLayer::getSymbolAvoidEdges() const { +const PropertyValue<bool>& SymbolLayer::getSymbolAvoidEdges() const { return impl().layout.get<SymbolAvoidEdges>(); } -void SymbolLayer::setSymbolAvoidEdges(PropertyValue<bool> value) { +void SymbolLayer::setSymbolAvoidEdges(const PropertyValue<bool>& value) { if (value == getSymbolAvoidEdges()) return; auto impl_ = mutableImpl(); @@ -112,11 +112,11 @@ PropertyValue<SymbolZOrderType> SymbolLayer::getDefaultSymbolZOrder() { return SymbolZOrder::defaultValue(); } -PropertyValue<SymbolZOrderType> SymbolLayer::getSymbolZOrder() const { +const PropertyValue<SymbolZOrderType>& SymbolLayer::getSymbolZOrder() const { return impl().layout.get<SymbolZOrder>(); } -void SymbolLayer::setSymbolZOrder(PropertyValue<SymbolZOrderType> value) { +void SymbolLayer::setSymbolZOrder(const PropertyValue<SymbolZOrderType>& value) { if (value == getSymbolZOrder()) return; auto impl_ = mutableImpl(); @@ -128,11 +128,11 @@ PropertyValue<bool> SymbolLayer::getDefaultIconAllowOverlap() { return IconAllowOverlap::defaultValue(); } -PropertyValue<bool> SymbolLayer::getIconAllowOverlap() const { +const PropertyValue<bool>& SymbolLayer::getIconAllowOverlap() const { return impl().layout.get<IconAllowOverlap>(); } -void SymbolLayer::setIconAllowOverlap(PropertyValue<bool> value) { +void SymbolLayer::setIconAllowOverlap(const PropertyValue<bool>& value) { if (value == getIconAllowOverlap()) return; auto impl_ = mutableImpl(); @@ -144,11 +144,11 @@ PropertyValue<bool> SymbolLayer::getDefaultIconIgnorePlacement() { return IconIgnorePlacement::defaultValue(); } -PropertyValue<bool> SymbolLayer::getIconIgnorePlacement() const { +const PropertyValue<bool>& SymbolLayer::getIconIgnorePlacement() const { return impl().layout.get<IconIgnorePlacement>(); } -void SymbolLayer::setIconIgnorePlacement(PropertyValue<bool> value) { +void SymbolLayer::setIconIgnorePlacement(const PropertyValue<bool>& value) { if (value == getIconIgnorePlacement()) return; auto impl_ = mutableImpl(); @@ -160,11 +160,11 @@ PropertyValue<bool> SymbolLayer::getDefaultIconOptional() { return IconOptional::defaultValue(); } -PropertyValue<bool> SymbolLayer::getIconOptional() const { +const PropertyValue<bool>& SymbolLayer::getIconOptional() const { return impl().layout.get<IconOptional>(); } -void SymbolLayer::setIconOptional(PropertyValue<bool> value) { +void SymbolLayer::setIconOptional(const PropertyValue<bool>& value) { if (value == getIconOptional()) return; auto impl_ = mutableImpl(); @@ -176,11 +176,11 @@ PropertyValue<AlignmentType> SymbolLayer::getDefaultIconRotationAlignment() { return IconRotationAlignment::defaultValue(); } -PropertyValue<AlignmentType> SymbolLayer::getIconRotationAlignment() const { +const PropertyValue<AlignmentType>& SymbolLayer::getIconRotationAlignment() const { return impl().layout.get<IconRotationAlignment>(); } -void SymbolLayer::setIconRotationAlignment(PropertyValue<AlignmentType> value) { +void SymbolLayer::setIconRotationAlignment(const PropertyValue<AlignmentType>& value) { if (value == getIconRotationAlignment()) return; auto impl_ = mutableImpl(); @@ -192,11 +192,11 @@ PropertyValue<float> SymbolLayer::getDefaultIconSize() { return IconSize::defaultValue(); } -PropertyValue<float> SymbolLayer::getIconSize() const { +const PropertyValue<float>& SymbolLayer::getIconSize() const { return impl().layout.get<IconSize>(); } -void SymbolLayer::setIconSize(PropertyValue<float> value) { +void SymbolLayer::setIconSize(const PropertyValue<float>& value) { if (value == getIconSize()) return; auto impl_ = mutableImpl(); @@ -208,11 +208,11 @@ PropertyValue<IconTextFitType> SymbolLayer::getDefaultIconTextFit() { return IconTextFit::defaultValue(); } -PropertyValue<IconTextFitType> SymbolLayer::getIconTextFit() const { +const PropertyValue<IconTextFitType>& SymbolLayer::getIconTextFit() const { return impl().layout.get<IconTextFit>(); } -void SymbolLayer::setIconTextFit(PropertyValue<IconTextFitType> value) { +void SymbolLayer::setIconTextFit(const PropertyValue<IconTextFitType>& value) { if (value == getIconTextFit()) return; auto impl_ = mutableImpl(); @@ -224,11 +224,11 @@ PropertyValue<std::array<float, 4>> SymbolLayer::getDefaultIconTextFitPadding() return IconTextFitPadding::defaultValue(); } -PropertyValue<std::array<float, 4>> SymbolLayer::getIconTextFitPadding() const { +const PropertyValue<std::array<float, 4>>& SymbolLayer::getIconTextFitPadding() const { return impl().layout.get<IconTextFitPadding>(); } -void SymbolLayer::setIconTextFitPadding(PropertyValue<std::array<float, 4>> value) { +void SymbolLayer::setIconTextFitPadding(const PropertyValue<std::array<float, 4>>& value) { if (value == getIconTextFitPadding()) return; auto impl_ = mutableImpl(); @@ -240,11 +240,11 @@ PropertyValue<std::string> SymbolLayer::getDefaultIconImage() { return IconImage::defaultValue(); } -PropertyValue<std::string> SymbolLayer::getIconImage() const { +const PropertyValue<std::string>& SymbolLayer::getIconImage() const { return impl().layout.get<IconImage>(); } -void SymbolLayer::setIconImage(PropertyValue<std::string> value) { +void SymbolLayer::setIconImage(const PropertyValue<std::string>& value) { if (value == getIconImage()) return; auto impl_ = mutableImpl(); @@ -256,11 +256,11 @@ PropertyValue<float> SymbolLayer::getDefaultIconRotate() { return IconRotate::defaultValue(); } -PropertyValue<float> SymbolLayer::getIconRotate() const { +const PropertyValue<float>& SymbolLayer::getIconRotate() const { return impl().layout.get<IconRotate>(); } -void SymbolLayer::setIconRotate(PropertyValue<float> value) { +void SymbolLayer::setIconRotate(const PropertyValue<float>& value) { if (value == getIconRotate()) return; auto impl_ = mutableImpl(); @@ -272,11 +272,11 @@ PropertyValue<float> SymbolLayer::getDefaultIconPadding() { return IconPadding::defaultValue(); } -PropertyValue<float> SymbolLayer::getIconPadding() const { +const PropertyValue<float>& SymbolLayer::getIconPadding() const { return impl().layout.get<IconPadding>(); } -void SymbolLayer::setIconPadding(PropertyValue<float> value) { +void SymbolLayer::setIconPadding(const PropertyValue<float>& value) { if (value == getIconPadding()) return; auto impl_ = mutableImpl(); @@ -288,11 +288,11 @@ PropertyValue<bool> SymbolLayer::getDefaultIconKeepUpright() { return IconKeepUpright::defaultValue(); } -PropertyValue<bool> SymbolLayer::getIconKeepUpright() const { +const PropertyValue<bool>& SymbolLayer::getIconKeepUpright() const { return impl().layout.get<IconKeepUpright>(); } -void SymbolLayer::setIconKeepUpright(PropertyValue<bool> value) { +void SymbolLayer::setIconKeepUpright(const PropertyValue<bool>& value) { if (value == getIconKeepUpright()) return; auto impl_ = mutableImpl(); @@ -304,11 +304,11 @@ PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconOffset() { return IconOffset::defaultValue(); } -PropertyValue<std::array<float, 2>> SymbolLayer::getIconOffset() const { +const PropertyValue<std::array<float, 2>>& SymbolLayer::getIconOffset() const { return impl().layout.get<IconOffset>(); } -void SymbolLayer::setIconOffset(PropertyValue<std::array<float, 2>> value) { +void SymbolLayer::setIconOffset(const PropertyValue<std::array<float, 2>>& value) { if (value == getIconOffset()) return; auto impl_ = mutableImpl(); @@ -320,11 +320,11 @@ PropertyValue<SymbolAnchorType> SymbolLayer::getDefaultIconAnchor() { return IconAnchor::defaultValue(); } -PropertyValue<SymbolAnchorType> SymbolLayer::getIconAnchor() const { +const PropertyValue<SymbolAnchorType>& SymbolLayer::getIconAnchor() const { return impl().layout.get<IconAnchor>(); } -void SymbolLayer::setIconAnchor(PropertyValue<SymbolAnchorType> value) { +void SymbolLayer::setIconAnchor(const PropertyValue<SymbolAnchorType>& value) { if (value == getIconAnchor()) return; auto impl_ = mutableImpl(); @@ -336,11 +336,11 @@ PropertyValue<AlignmentType> SymbolLayer::getDefaultIconPitchAlignment() { return IconPitchAlignment::defaultValue(); } -PropertyValue<AlignmentType> SymbolLayer::getIconPitchAlignment() const { +const PropertyValue<AlignmentType>& SymbolLayer::getIconPitchAlignment() const { return impl().layout.get<IconPitchAlignment>(); } -void SymbolLayer::setIconPitchAlignment(PropertyValue<AlignmentType> value) { +void SymbolLayer::setIconPitchAlignment(const PropertyValue<AlignmentType>& value) { if (value == getIconPitchAlignment()) return; auto impl_ = mutableImpl(); @@ -352,11 +352,11 @@ PropertyValue<AlignmentType> SymbolLayer::getDefaultTextPitchAlignment() { return TextPitchAlignment::defaultValue(); } -PropertyValue<AlignmentType> SymbolLayer::getTextPitchAlignment() const { +const PropertyValue<AlignmentType>& SymbolLayer::getTextPitchAlignment() const { return impl().layout.get<TextPitchAlignment>(); } -void SymbolLayer::setTextPitchAlignment(PropertyValue<AlignmentType> value) { +void SymbolLayer::setTextPitchAlignment(const PropertyValue<AlignmentType>& value) { if (value == getTextPitchAlignment()) return; auto impl_ = mutableImpl(); @@ -368,11 +368,11 @@ PropertyValue<AlignmentType> SymbolLayer::getDefaultTextRotationAlignment() { return TextRotationAlignment::defaultValue(); } -PropertyValue<AlignmentType> SymbolLayer::getTextRotationAlignment() const { +const PropertyValue<AlignmentType>& SymbolLayer::getTextRotationAlignment() const { return impl().layout.get<TextRotationAlignment>(); } -void SymbolLayer::setTextRotationAlignment(PropertyValue<AlignmentType> value) { +void SymbolLayer::setTextRotationAlignment(const PropertyValue<AlignmentType>& value) { if (value == getTextRotationAlignment()) return; auto impl_ = mutableImpl(); @@ -384,11 +384,11 @@ PropertyValue<expression::Formatted> SymbolLayer::getDefaultTextField() { return TextField::defaultValue(); } -PropertyValue<expression::Formatted> SymbolLayer::getTextField() const { +const PropertyValue<expression::Formatted>& SymbolLayer::getTextField() const { return impl().layout.get<TextField>(); } -void SymbolLayer::setTextField(PropertyValue<expression::Formatted> value) { +void SymbolLayer::setTextField(const PropertyValue<expression::Formatted>& value) { if (value == getTextField()) return; auto impl_ = mutableImpl(); @@ -400,11 +400,11 @@ PropertyValue<std::vector<std::string>> SymbolLayer::getDefaultTextFont() { return TextFont::defaultValue(); } -PropertyValue<std::vector<std::string>> SymbolLayer::getTextFont() const { +const PropertyValue<std::vector<std::string>>& SymbolLayer::getTextFont() const { return impl().layout.get<TextFont>(); } -void SymbolLayer::setTextFont(PropertyValue<std::vector<std::string>> value) { +void SymbolLayer::setTextFont(const PropertyValue<std::vector<std::string>>& value) { if (value == getTextFont()) return; auto impl_ = mutableImpl(); @@ -416,11 +416,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextSize() { return TextSize::defaultValue(); } -PropertyValue<float> SymbolLayer::getTextSize() const { +const PropertyValue<float>& SymbolLayer::getTextSize() const { return impl().layout.get<TextSize>(); } -void SymbolLayer::setTextSize(PropertyValue<float> value) { +void SymbolLayer::setTextSize(const PropertyValue<float>& value) { if (value == getTextSize()) return; auto impl_ = mutableImpl(); @@ -432,11 +432,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextMaxWidth() { return TextMaxWidth::defaultValue(); } -PropertyValue<float> SymbolLayer::getTextMaxWidth() const { +const PropertyValue<float>& SymbolLayer::getTextMaxWidth() const { return impl().layout.get<TextMaxWidth>(); } -void SymbolLayer::setTextMaxWidth(PropertyValue<float> value) { +void SymbolLayer::setTextMaxWidth(const PropertyValue<float>& value) { if (value == getTextMaxWidth()) return; auto impl_ = mutableImpl(); @@ -448,11 +448,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextLineHeight() { return TextLineHeight::defaultValue(); } -PropertyValue<float> SymbolLayer::getTextLineHeight() const { +const PropertyValue<float>& SymbolLayer::getTextLineHeight() const { return impl().layout.get<TextLineHeight>(); } -void SymbolLayer::setTextLineHeight(PropertyValue<float> value) { +void SymbolLayer::setTextLineHeight(const PropertyValue<float>& value) { if (value == getTextLineHeight()) return; auto impl_ = mutableImpl(); @@ -464,11 +464,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextLetterSpacing() { return TextLetterSpacing::defaultValue(); } -PropertyValue<float> SymbolLayer::getTextLetterSpacing() const { +const PropertyValue<float>& SymbolLayer::getTextLetterSpacing() const { return impl().layout.get<TextLetterSpacing>(); } -void SymbolLayer::setTextLetterSpacing(PropertyValue<float> value) { +void SymbolLayer::setTextLetterSpacing(const PropertyValue<float>& value) { if (value == getTextLetterSpacing()) return; auto impl_ = mutableImpl(); @@ -480,11 +480,11 @@ PropertyValue<TextJustifyType> SymbolLayer::getDefaultTextJustify() { return TextJustify::defaultValue(); } -PropertyValue<TextJustifyType> SymbolLayer::getTextJustify() const { +const PropertyValue<TextJustifyType>& SymbolLayer::getTextJustify() const { return impl().layout.get<TextJustify>(); } -void SymbolLayer::setTextJustify(PropertyValue<TextJustifyType> value) { +void SymbolLayer::setTextJustify(const PropertyValue<TextJustifyType>& value) { if (value == getTextJustify()) return; auto impl_ = mutableImpl(); @@ -496,11 +496,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextRadialOffset() { return TextRadialOffset::defaultValue(); } -PropertyValue<float> SymbolLayer::getTextRadialOffset() const { +const PropertyValue<float>& SymbolLayer::getTextRadialOffset() const { return impl().layout.get<TextRadialOffset>(); } -void SymbolLayer::setTextRadialOffset(PropertyValue<float> value) { +void SymbolLayer::setTextRadialOffset(const PropertyValue<float>& value) { if (value == getTextRadialOffset()) return; auto impl_ = mutableImpl(); @@ -512,11 +512,11 @@ PropertyValue<std::vector<TextVariableAnchorType>> SymbolLayer::getDefaultTextVa return TextVariableAnchor::defaultValue(); } -PropertyValue<std::vector<TextVariableAnchorType>> SymbolLayer::getTextVariableAnchor() const { +const PropertyValue<std::vector<TextVariableAnchorType>>& SymbolLayer::getTextVariableAnchor() const { return impl().layout.get<TextVariableAnchor>(); } -void SymbolLayer::setTextVariableAnchor(PropertyValue<std::vector<TextVariableAnchorType>> value) { +void SymbolLayer::setTextVariableAnchor(const PropertyValue<std::vector<TextVariableAnchorType>>& value) { if (value == getTextVariableAnchor()) return; auto impl_ = mutableImpl(); @@ -528,11 +528,11 @@ PropertyValue<SymbolAnchorType> SymbolLayer::getDefaultTextAnchor() { return TextAnchor::defaultValue(); } -PropertyValue<SymbolAnchorType> SymbolLayer::getTextAnchor() const { +const PropertyValue<SymbolAnchorType>& SymbolLayer::getTextAnchor() const { return impl().layout.get<TextAnchor>(); } -void SymbolLayer::setTextAnchor(PropertyValue<SymbolAnchorType> value) { +void SymbolLayer::setTextAnchor(const PropertyValue<SymbolAnchorType>& value) { if (value == getTextAnchor()) return; auto impl_ = mutableImpl(); @@ -544,11 +544,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextMaxAngle() { return TextMaxAngle::defaultValue(); } -PropertyValue<float> SymbolLayer::getTextMaxAngle() const { +const PropertyValue<float>& SymbolLayer::getTextMaxAngle() const { return impl().layout.get<TextMaxAngle>(); } -void SymbolLayer::setTextMaxAngle(PropertyValue<float> value) { +void SymbolLayer::setTextMaxAngle(const PropertyValue<float>& value) { if (value == getTextMaxAngle()) return; auto impl_ = mutableImpl(); @@ -560,11 +560,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextRotate() { return TextRotate::defaultValue(); } -PropertyValue<float> SymbolLayer::getTextRotate() const { +const PropertyValue<float>& SymbolLayer::getTextRotate() const { return impl().layout.get<TextRotate>(); } -void SymbolLayer::setTextRotate(PropertyValue<float> value) { +void SymbolLayer::setTextRotate(const PropertyValue<float>& value) { if (value == getTextRotate()) return; auto impl_ = mutableImpl(); @@ -576,11 +576,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextPadding() { return TextPadding::defaultValue(); } -PropertyValue<float> SymbolLayer::getTextPadding() const { +const PropertyValue<float>& SymbolLayer::getTextPadding() const { return impl().layout.get<TextPadding>(); } -void SymbolLayer::setTextPadding(PropertyValue<float> value) { +void SymbolLayer::setTextPadding(const PropertyValue<float>& value) { if (value == getTextPadding()) return; auto impl_ = mutableImpl(); @@ -592,11 +592,11 @@ PropertyValue<bool> SymbolLayer::getDefaultTextKeepUpright() { return TextKeepUpright::defaultValue(); } -PropertyValue<bool> SymbolLayer::getTextKeepUpright() const { +const PropertyValue<bool>& SymbolLayer::getTextKeepUpright() const { return impl().layout.get<TextKeepUpright>(); } -void SymbolLayer::setTextKeepUpright(PropertyValue<bool> value) { +void SymbolLayer::setTextKeepUpright(const PropertyValue<bool>& value) { if (value == getTextKeepUpright()) return; auto impl_ = mutableImpl(); @@ -608,11 +608,11 @@ PropertyValue<TextTransformType> SymbolLayer::getDefaultTextTransform() { return TextTransform::defaultValue(); } -PropertyValue<TextTransformType> SymbolLayer::getTextTransform() const { +const PropertyValue<TextTransformType>& SymbolLayer::getTextTransform() const { return impl().layout.get<TextTransform>(); } -void SymbolLayer::setTextTransform(PropertyValue<TextTransformType> value) { +void SymbolLayer::setTextTransform(const PropertyValue<TextTransformType>& value) { if (value == getTextTransform()) return; auto impl_ = mutableImpl(); @@ -624,11 +624,11 @@ PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextOffset() { return TextOffset::defaultValue(); } -PropertyValue<std::array<float, 2>> SymbolLayer::getTextOffset() const { +const PropertyValue<std::array<float, 2>>& SymbolLayer::getTextOffset() const { return impl().layout.get<TextOffset>(); } -void SymbolLayer::setTextOffset(PropertyValue<std::array<float, 2>> value) { +void SymbolLayer::setTextOffset(const PropertyValue<std::array<float, 2>>& value) { if (value == getTextOffset()) return; auto impl_ = mutableImpl(); @@ -640,11 +640,11 @@ PropertyValue<bool> SymbolLayer::getDefaultTextAllowOverlap() { return TextAllowOverlap::defaultValue(); } -PropertyValue<bool> SymbolLayer::getTextAllowOverlap() const { +const PropertyValue<bool>& SymbolLayer::getTextAllowOverlap() const { return impl().layout.get<TextAllowOverlap>(); } -void SymbolLayer::setTextAllowOverlap(PropertyValue<bool> value) { +void SymbolLayer::setTextAllowOverlap(const PropertyValue<bool>& value) { if (value == getTextAllowOverlap()) return; auto impl_ = mutableImpl(); @@ -656,11 +656,11 @@ PropertyValue<bool> SymbolLayer::getDefaultTextIgnorePlacement() { return TextIgnorePlacement::defaultValue(); } -PropertyValue<bool> SymbolLayer::getTextIgnorePlacement() const { +const PropertyValue<bool>& SymbolLayer::getTextIgnorePlacement() const { return impl().layout.get<TextIgnorePlacement>(); } -void SymbolLayer::setTextIgnorePlacement(PropertyValue<bool> value) { +void SymbolLayer::setTextIgnorePlacement(const PropertyValue<bool>& value) { if (value == getTextIgnorePlacement()) return; auto impl_ = mutableImpl(); @@ -672,11 +672,11 @@ PropertyValue<bool> SymbolLayer::getDefaultTextOptional() { return TextOptional::defaultValue(); } -PropertyValue<bool> SymbolLayer::getTextOptional() const { +const PropertyValue<bool>& SymbolLayer::getTextOptional() const { return impl().layout.get<TextOptional>(); } -void SymbolLayer::setTextOptional(PropertyValue<bool> value) { +void SymbolLayer::setTextOptional(const PropertyValue<bool>& value) { if (value == getTextOptional()) return; auto impl_ = mutableImpl(); @@ -691,11 +691,11 @@ PropertyValue<float> SymbolLayer::getDefaultIconOpacity() { return { 1 }; } -PropertyValue<float> SymbolLayer::getIconOpacity() const { +const PropertyValue<float>& SymbolLayer::getIconOpacity() const { return impl().paint.template get<IconOpacity>().value; } -void SymbolLayer::setIconOpacity(PropertyValue<float> value) { +void SymbolLayer::setIconOpacity(const PropertyValue<float>& value) { if (value == getIconOpacity()) return; auto impl_ = mutableImpl(); @@ -718,11 +718,11 @@ PropertyValue<Color> SymbolLayer::getDefaultIconColor() { return { Color::black() }; } -PropertyValue<Color> SymbolLayer::getIconColor() const { +const PropertyValue<Color>& SymbolLayer::getIconColor() const { return impl().paint.template get<IconColor>().value; } -void SymbolLayer::setIconColor(PropertyValue<Color> value) { +void SymbolLayer::setIconColor(const PropertyValue<Color>& value) { if (value == getIconColor()) return; auto impl_ = mutableImpl(); @@ -745,11 +745,11 @@ PropertyValue<Color> SymbolLayer::getDefaultIconHaloColor() { return { {} }; } -PropertyValue<Color> SymbolLayer::getIconHaloColor() const { +const PropertyValue<Color>& SymbolLayer::getIconHaloColor() const { return impl().paint.template get<IconHaloColor>().value; } -void SymbolLayer::setIconHaloColor(PropertyValue<Color> value) { +void SymbolLayer::setIconHaloColor(const PropertyValue<Color>& value) { if (value == getIconHaloColor()) return; auto impl_ = mutableImpl(); @@ -772,11 +772,11 @@ PropertyValue<float> SymbolLayer::getDefaultIconHaloWidth() { return { 0 }; } -PropertyValue<float> SymbolLayer::getIconHaloWidth() const { +const PropertyValue<float>& SymbolLayer::getIconHaloWidth() const { return impl().paint.template get<IconHaloWidth>().value; } -void SymbolLayer::setIconHaloWidth(PropertyValue<float> value) { +void SymbolLayer::setIconHaloWidth(const PropertyValue<float>& value) { if (value == getIconHaloWidth()) return; auto impl_ = mutableImpl(); @@ -799,11 +799,11 @@ PropertyValue<float> SymbolLayer::getDefaultIconHaloBlur() { return { 0 }; } -PropertyValue<float> SymbolLayer::getIconHaloBlur() const { +const PropertyValue<float>& SymbolLayer::getIconHaloBlur() const { return impl().paint.template get<IconHaloBlur>().value; } -void SymbolLayer::setIconHaloBlur(PropertyValue<float> value) { +void SymbolLayer::setIconHaloBlur(const PropertyValue<float>& value) { if (value == getIconHaloBlur()) return; auto impl_ = mutableImpl(); @@ -826,11 +826,11 @@ PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconTranslate() { return { {{ 0, 0 }} }; } -PropertyValue<std::array<float, 2>> SymbolLayer::getIconTranslate() const { +const PropertyValue<std::array<float, 2>>& SymbolLayer::getIconTranslate() const { return impl().paint.template get<IconTranslate>().value; } -void SymbolLayer::setIconTranslate(PropertyValue<std::array<float, 2>> value) { +void SymbolLayer::setIconTranslate(const PropertyValue<std::array<float, 2>>& value) { if (value == getIconTranslate()) return; auto impl_ = mutableImpl(); @@ -853,11 +853,11 @@ PropertyValue<TranslateAnchorType> SymbolLayer::getDefaultIconTranslateAnchor() return { TranslateAnchorType::Map }; } -PropertyValue<TranslateAnchorType> SymbolLayer::getIconTranslateAnchor() const { +const PropertyValue<TranslateAnchorType>& SymbolLayer::getIconTranslateAnchor() const { return impl().paint.template get<IconTranslateAnchor>().value; } -void SymbolLayer::setIconTranslateAnchor(PropertyValue<TranslateAnchorType> value) { +void SymbolLayer::setIconTranslateAnchor(const PropertyValue<TranslateAnchorType>& value) { if (value == getIconTranslateAnchor()) return; auto impl_ = mutableImpl(); @@ -880,11 +880,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextOpacity() { return { 1 }; } -PropertyValue<float> SymbolLayer::getTextOpacity() const { +const PropertyValue<float>& SymbolLayer::getTextOpacity() const { return impl().paint.template get<TextOpacity>().value; } -void SymbolLayer::setTextOpacity(PropertyValue<float> value) { +void SymbolLayer::setTextOpacity(const PropertyValue<float>& value) { if (value == getTextOpacity()) return; auto impl_ = mutableImpl(); @@ -907,11 +907,11 @@ PropertyValue<Color> SymbolLayer::getDefaultTextColor() { return { Color::black() }; } -PropertyValue<Color> SymbolLayer::getTextColor() const { +const PropertyValue<Color>& SymbolLayer::getTextColor() const { return impl().paint.template get<TextColor>().value; } -void SymbolLayer::setTextColor(PropertyValue<Color> value) { +void SymbolLayer::setTextColor(const PropertyValue<Color>& value) { if (value == getTextColor()) return; auto impl_ = mutableImpl(); @@ -934,11 +934,11 @@ PropertyValue<Color> SymbolLayer::getDefaultTextHaloColor() { return { {} }; } -PropertyValue<Color> SymbolLayer::getTextHaloColor() const { +const PropertyValue<Color>& SymbolLayer::getTextHaloColor() const { return impl().paint.template get<TextHaloColor>().value; } -void SymbolLayer::setTextHaloColor(PropertyValue<Color> value) { +void SymbolLayer::setTextHaloColor(const PropertyValue<Color>& value) { if (value == getTextHaloColor()) return; auto impl_ = mutableImpl(); @@ -961,11 +961,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextHaloWidth() { return { 0 }; } -PropertyValue<float> SymbolLayer::getTextHaloWidth() const { +const PropertyValue<float>& SymbolLayer::getTextHaloWidth() const { return impl().paint.template get<TextHaloWidth>().value; } -void SymbolLayer::setTextHaloWidth(PropertyValue<float> value) { +void SymbolLayer::setTextHaloWidth(const PropertyValue<float>& value) { if (value == getTextHaloWidth()) return; auto impl_ = mutableImpl(); @@ -988,11 +988,11 @@ PropertyValue<float> SymbolLayer::getDefaultTextHaloBlur() { return { 0 }; } -PropertyValue<float> SymbolLayer::getTextHaloBlur() const { +const PropertyValue<float>& SymbolLayer::getTextHaloBlur() const { return impl().paint.template get<TextHaloBlur>().value; } -void SymbolLayer::setTextHaloBlur(PropertyValue<float> value) { +void SymbolLayer::setTextHaloBlur(const PropertyValue<float>& value) { if (value == getTextHaloBlur()) return; auto impl_ = mutableImpl(); @@ -1015,11 +1015,11 @@ PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextTranslate() { return { {{ 0, 0 }} }; } -PropertyValue<std::array<float, 2>> SymbolLayer::getTextTranslate() const { +const PropertyValue<std::array<float, 2>>& SymbolLayer::getTextTranslate() const { return impl().paint.template get<TextTranslate>().value; } -void SymbolLayer::setTextTranslate(PropertyValue<std::array<float, 2>> value) { +void SymbolLayer::setTextTranslate(const PropertyValue<std::array<float, 2>>& value) { if (value == getTextTranslate()) return; auto impl_ = mutableImpl(); @@ -1042,11 +1042,11 @@ PropertyValue<TranslateAnchorType> SymbolLayer::getDefaultTextTranslateAnchor() return { TranslateAnchorType::Map }; } -PropertyValue<TranslateAnchorType> SymbolLayer::getTextTranslateAnchor() const { +const PropertyValue<TranslateAnchorType>& SymbolLayer::getTextTranslateAnchor() const { return impl().paint.template get<TextTranslateAnchor>().value; } -void SymbolLayer::setTextTranslateAnchor(PropertyValue<TranslateAnchorType> value) { +void SymbolLayer::setTextTranslateAnchor(const PropertyValue<TranslateAnchorType>& value) { if (value == getTextTranslateAnchor()) return; auto impl_ = mutableImpl(); @@ -1135,7 +1135,7 @@ optional<Error> SymbolLayer::setPaintProperty(const std::string& name, const Con return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::IconOpacity || property == Property::IconHaloWidth || property == Property::IconHaloBlur || property == Property::TextOpacity || property == Property::TextHaloWidth || property == Property::TextHaloBlur) { @@ -1417,7 +1417,7 @@ optional<Error> SymbolLayer::setLayoutProperty(const std::string& name, const Co return Error { "layer doesn't support this property" }; } - Property property = static_cast<Property>(it->second); + auto property = static_cast<Property>(it->second); if (property == Property::SymbolPlacement) { |