summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/background_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/layers/background_layer.cpp')
-rw-r--r--src/mbgl/style/layers/background_layer.cpp14
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) {