Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Update style generator
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshalamov committed Dec 10, 2019
1 parent a78e6df commit 9cf1846
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 92 deletions.
3 changes: 1 addition & 2 deletions src/mbgl/style/layers/layer.cpp.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ const <%- propertyValueType(property) %>& <%- camelize(type) %>Layer::get<%- cam
}
void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(const <%- propertyValueType(property) %>& value) {
if (value == get<%- camelize(property.name) %>())
return;
if (value == get<%- camelize(property.name) %>()) return;
auto impl_ = mutableImpl();
impl_->layout.get<<%- camelize(property.name) %>>() = value;
baseImpl = std::move(impl_);
Expand Down
12 changes: 4 additions & 8 deletions src/mbgl/style/layers/line_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ const PropertyValue<LineCapType>& LineLayer::getLineCap() const {
}

void LineLayer::setLineCap(const PropertyValue<LineCapType>& value) {
if (value == getLineCap())
return;
if (value == getLineCap()) return;
auto impl_ = mutableImpl();
impl_->layout.get<LineCap>() = value;
baseImpl = std::move(impl_);
Expand All @@ -86,8 +85,7 @@ const PropertyValue<LineJoinType>& LineLayer::getLineJoin() const {
}

void LineLayer::setLineJoin(const PropertyValue<LineJoinType>& value) {
if (value == getLineJoin())
return;
if (value == getLineJoin()) return;
auto impl_ = mutableImpl();
impl_->layout.get<LineJoin>() = value;
baseImpl = std::move(impl_);
Expand All @@ -102,8 +100,7 @@ const PropertyValue<float>& LineLayer::getLineMiterLimit() const {
}

void LineLayer::setLineMiterLimit(const PropertyValue<float>& value) {
if (value == getLineMiterLimit())
return;
if (value == getLineMiterLimit()) return;
auto impl_ = mutableImpl();
impl_->layout.get<LineMiterLimit>() = value;
baseImpl = std::move(impl_);
Expand All @@ -118,8 +115,7 @@ const PropertyValue<float>& LineLayer::getLineRoundLimit() const {
}

void LineLayer::setLineRoundLimit(const PropertyValue<float>& value) {
if (value == getLineRoundLimit())
return;
if (value == getLineRoundLimit()) return;
auto impl_ = mutableImpl();
impl_->layout.get<LineRoundLimit>() = value;
baseImpl = std::move(impl_);
Expand Down
Loading

0 comments on commit 9cf1846

Please sign in to comment.