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/background_layer.cpp | |
parent | d7aaf83421261087a99d18d92eca9637c1bf72f8 (diff) | |
download | qtlocation-mapboxgl-3ceabcd3ec91dbd9458d3c5b78fb12c3182636e1.tar.gz |
[core] clang-tidy fixes
Diffstat (limited to 'src/mbgl/style/layers/background_layer.cpp')
-rw-r--r-- | src/mbgl/style/layers/background_layer.cpp | 14 |
1 files changed, 7 insertions, 7 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) { |