[core] clang-tidy fixes
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
Mailbox::Mailbox() {
|
||||
}
|
||||
Mailbox::Mailbox() = default;
|
||||
|
||||
Mailbox::Mailbox(Scheduler& scheduler_)
|
||||
: scheduler(&scheduler_) {
|
||||
|
||||
@@ -64,7 +64,7 @@ GeometryCollection AnnotationTileFeature::getGeometries() const {
|
||||
|
||||
class AnnotationTileLayerData {
|
||||
public:
|
||||
AnnotationTileLayerData(const std::string& name_) : name(name_) {
|
||||
AnnotationTileLayerData(std::string name_) : name(std::move(name_)) {
|
||||
}
|
||||
|
||||
const std::string name;
|
||||
|
||||
@@ -22,7 +22,7 @@ void LineAnnotationImpl::updateStyle(Style::Impl& style) const {
|
||||
layer = style.addLayer(std::move(newLayer), AnnotationManager::PointLayerID);
|
||||
}
|
||||
|
||||
LineLayer* lineLayer = static_cast<LineLayer*>(layer);
|
||||
auto* lineLayer = static_cast<LineLayer*>(layer);
|
||||
lineLayer->setLineOpacity(annotation.opacity);
|
||||
lineLayer->setLineWidth(annotation.width);
|
||||
lineLayer->setLineColor(annotation.color);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <mbgl/layout/symbol_instance.hpp>
|
||||
#include <mbgl/style/layers/symbol_layer_properties.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
@@ -34,7 +35,7 @@ SymbolInstance::SymbolInstance(Anchor& anchor_,
|
||||
const IndexedSubfeature& indexedFeature,
|
||||
const std::size_t layoutFeatureIndex_,
|
||||
const std::size_t dataFeatureIndex_,
|
||||
const std::u16string& key_,
|
||||
std::u16string key_,
|
||||
const float overscaling,
|
||||
const float rotate,
|
||||
float radialTextOffset_) :
|
||||
@@ -52,7 +53,7 @@ SymbolInstance::SymbolInstance(Anchor& anchor_,
|
||||
dataFeatureIndex(dataFeatureIndex_),
|
||||
textOffset(textOffset_),
|
||||
iconOffset(iconOffset_),
|
||||
key(key_),
|
||||
key(std::move(key_)),
|
||||
textBoxScale(textBoxScale_),
|
||||
radialTextOffset(radialTextOffset_),
|
||||
singleLine(shapedTextOrientations.singleLine) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
const IndexedSubfeature&,
|
||||
const std::size_t layoutFeatureIndex,
|
||||
const std::size_t dataFeatureIndex,
|
||||
const std::u16string& key,
|
||||
std::u16string key,
|
||||
const float overscaling,
|
||||
const float rotate,
|
||||
float radialTextOffset);
|
||||
|
||||
@@ -117,8 +117,7 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters,
|
||||
FontStack baseFontStack = layout.evaluate<TextFont>(zoom, ft);
|
||||
|
||||
ft.formattedText = TaggedString();
|
||||
for (std::size_t j = 0; j < formatted.sections.size(); j++) {
|
||||
const auto& section = formatted.sections[j];
|
||||
for (const auto & section : formatted.sections) {
|
||||
std::string u8string = section.text;
|
||||
if (textTransform == TextTransformType::Uppercase) {
|
||||
u8string = platform::uppercase(u8string);
|
||||
|
||||
@@ -252,7 +252,7 @@ CameraOptions Map::cameraForGeometry(const Geometry<double>& geometry, const Edg
|
||||
|
||||
std::vector<LatLng> latLngs;
|
||||
forEachPoint(geometry, [&](const Point<double>& pt) {
|
||||
latLngs.push_back({ pt.y, pt.x });
|
||||
latLngs.emplace_back(pt.y, pt.x);
|
||||
});
|
||||
return cameraForLatLngs(latLngs, padding, bearing, pitch);
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ void SymbolBucket::sortFeatures(const float angle) {
|
||||
std::sort(symbolInstanceIndexes.begin(), symbolInstanceIndexes.end(), [sin, cos, this](size_t &aIndex, size_t &bIndex) {
|
||||
const SymbolInstance& a = symbolInstances[aIndex];
|
||||
const SymbolInstance& b = symbolInstances[bIndex];
|
||||
const int32_t aRotated = static_cast<int32_t>(::lround(sin * a.anchor.point.x + cos * a.anchor.point.y));
|
||||
const int32_t bRotated = static_cast<int32_t>(::lround(sin * b.anchor.point.x + cos * b.anchor.point.y));
|
||||
const auto aRotated = static_cast<int32_t>(::lround(sin * a.anchor.point.x + cos * a.anchor.point.y));
|
||||
const auto bRotated = static_cast<int32_t>(::lround(sin * b.anchor.point.x + cos * b.anchor.point.y));
|
||||
return aRotated != bRotated ?
|
||||
aRotated < bRotated :
|
||||
a.dataFeatureIndex > b.dataFeatureIndex;
|
||||
|
||||
@@ -59,7 +59,7 @@ void RenderCustomLayer::render(PaintParameters& paintParameters, RenderSource*)
|
||||
}
|
||||
|
||||
// TODO: remove cast
|
||||
gl::Context& glContext = static_cast<gl::Context&>(paintParameters.context);
|
||||
auto& glContext = static_cast<gl::Context&>(paintParameters.context);
|
||||
const TransformState& state = paintParameters.state;
|
||||
|
||||
// Reset GL state to a known state so the CustomLayer always has a clean slate.
|
||||
|
||||
@@ -138,7 +138,7 @@ void RenderFillExtrusionLayer::render(PaintParameters& parameters, RenderSource*
|
||||
continue;
|
||||
}
|
||||
const auto fillPatternValue = evaluated.get<FillExtrusionPattern>().constantOr(mbgl::Faded<std::basic_string<char> >{"", ""});
|
||||
GeometryTile& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
auto& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
optional<ImagePosition> patternPosA = geometryTile.getPattern(fillPatternValue.from);
|
||||
optional<ImagePosition> patternPosB = geometryTile.getPattern(fillPatternValue.to);
|
||||
FillExtrusionBucket& bucket = *bucket_;
|
||||
|
||||
@@ -150,7 +150,7 @@ void RenderFillLayer::render(PaintParameters& parameters, RenderSource*) {
|
||||
}
|
||||
const auto fillPatternValue = evaluated.get<FillPattern>().constantOr(Faded<std::basic_string<char>>{"", ""});
|
||||
for (const RenderTile& tile : renderTiles) {
|
||||
GeometryTile& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
auto& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
optional<ImagePosition> patternPosA = geometryTile.getPattern(fillPatternValue.from);
|
||||
optional<ImagePosition> patternPosB = geometryTile.getPattern(fillPatternValue.to);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ void RenderHillshadeLayer::render(PaintParameters& parameters, RenderSource* src
|
||||
if (parameters.pass != RenderPass::Translucent && parameters.pass != RenderPass::Pass3D)
|
||||
return;
|
||||
|
||||
RenderRasterDEMSource* demsrc = static_cast<RenderRasterDEMSource*>(src);
|
||||
auto* demsrc = static_cast<RenderRasterDEMSource*>(src);
|
||||
const uint8_t TERRAIN_RGB_MAXZOOM = 15;
|
||||
const uint8_t maxzoom = demsrc != nullptr ? demsrc->getMaxZoom() : TERRAIN_RGB_MAXZOOM;
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ void RenderLineLayer::render(PaintParameters& parameters, RenderSource*) {
|
||||
|
||||
} else if (!unevaluated.get<LinePattern>().isUndefined()) {
|
||||
const auto linePatternValue = evaluated.get<LinePattern>().constantOr(Faded<std::basic_string<char>>{ "", ""});
|
||||
GeometryTile& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
auto& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
const Size texsize = geometryTile.iconAtlasTexture->size;
|
||||
|
||||
optional<ImagePosition> posA = geometryTile.getPattern(linePatternValue.from);
|
||||
|
||||
@@ -127,7 +127,7 @@ void RenderRasterLayer::render(PaintParameters& parameters, RenderSource* source
|
||||
|
||||
const gfx::TextureFilterType filter = evaluated.get<RasterResampling>() == RasterResamplingType::Nearest ? gfx::TextureFilterType::Nearest : gfx::TextureFilterType::Linear;
|
||||
|
||||
if (RenderImageSource* imageSource = source->as<RenderImageSource>()) {
|
||||
if (auto* imageSource = source->as<RenderImageSource>()) {
|
||||
if (imageSource->isEnabled() && imageSource->isLoaded() && !imageSource->bucket->needsUpload()) {
|
||||
RasterBucket& bucket = *imageSource->bucket;
|
||||
assert(bucket.texture);
|
||||
|
||||
@@ -148,7 +148,7 @@ void RenderSymbolLayer::render(PaintParameters& parameters, RenderSource*) {
|
||||
};
|
||||
|
||||
assert(tile.tile.kind == Tile::Kind::Geometry);
|
||||
GeometryTile& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
auto& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
|
||||
if (bucket.hasIconData()) {
|
||||
auto values = iconPropertyValues(evaluated_, layout);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <mbgl/tile/tile.hpp>
|
||||
|
||||
#include <mbgl/layermanager/layer_manager.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
@@ -50,7 +51,7 @@ std::unique_ptr<RenderSource> RenderSource::create(Immutable<Source::Impl> impl)
|
||||
static RenderSourceObserver nullObserver;
|
||||
|
||||
RenderSource::RenderSource(Immutable<style::Source::Impl> impl)
|
||||
: baseImpl(impl),
|
||||
: baseImpl(std::move(impl)),
|
||||
observer(&nullObserver) {
|
||||
}
|
||||
|
||||
|
||||
@@ -576,7 +576,7 @@ void Renderer::Impl::queryRenderedSymbols(std::unordered_map<std::string, std::v
|
||||
auto renderedSymbols = placement->getCollisionIndex().queryRenderedSymbols(geometry);
|
||||
std::vector<std::reference_wrapper<const RetainedQueryData>> bucketQueryData;
|
||||
for (auto entry : renderedSymbols) {
|
||||
bucketQueryData.push_back(placement->getQueryData(entry.first));
|
||||
bucketQueryData.emplace_back(placement->getQueryData(entry.first));
|
||||
}
|
||||
// Although symbol query is global, symbol results are only sortable within a bucket
|
||||
// For a predictable global sort renderItems, we sort the buckets based on their corresponding tile position
|
||||
|
||||
@@ -66,7 +66,7 @@ MAPBOX_ETERNAL_CONSTEXPR const auto extensionGetters = mapbox::eternal::hash_map
|
||||
{"expansion-zoom", &getClusterExpansionZoom}
|
||||
});
|
||||
|
||||
}
|
||||
} // namespace
|
||||
|
||||
RenderGeoJSONSource::RenderGeoJSONSource(Immutable<style::GeoJSONSource::Impl> impl_)
|
||||
: RenderSource(impl_) {
|
||||
|
||||
@@ -38,10 +38,10 @@ void RenderImageSource::startRender(PaintParameters& parameters) {
|
||||
|
||||
matrices.clear();
|
||||
|
||||
for (size_t i = 0; i < tileIds.size(); i++) {
|
||||
for (auto& tileId : tileIds) {
|
||||
mat4 matrix;
|
||||
matrix::identity(matrix);
|
||||
parameters.state.matrixFor(matrix, tileIds[i]);
|
||||
parameters.state.matrixFor(matrix, tileId);
|
||||
matrix::multiply(matrix, parameters.alignedProjMatrix, matrix);
|
||||
matrices.push_back(matrix);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ void RenderImageSource::update(Immutable<style::Source::Impl> baseImpl_,
|
||||
auto idealTiles = util::tileCover(transformState, transformState.getZoom());
|
||||
for (auto tile : idealTiles) {
|
||||
if (tile.wrap != 0 && tileCover[0].canonical.isChildOf(tile.canonical)) {
|
||||
tileIds.push_back({ tile.wrap, tileCover[0].canonical });
|
||||
tileIds.emplace_back(tile.wrap, tileCover[0].canonical);
|
||||
hasVisibleTile = true;
|
||||
}
|
||||
else if (!hasVisibleTile) {
|
||||
|
||||
@@ -60,7 +60,7 @@ void RenderRasterDEMSource::update(Immutable<style::Source::Impl> baseImpl_,
|
||||
}
|
||||
|
||||
void RenderRasterDEMSource::onTileChanged(Tile& tile){
|
||||
RasterDEMTile& demtile = static_cast<RasterDEMTile&>(tile);
|
||||
auto& demtile = static_cast<RasterDEMTile&>(tile);
|
||||
|
||||
std::map<DEMTileNeighbors, DEMTileNeighbors> opposites = {
|
||||
{ DEMTileNeighbors::Left, DEMTileNeighbors::Right },
|
||||
@@ -104,13 +104,13 @@ void RenderRasterDEMSource::onTileChanged(Tile& tile){
|
||||
};
|
||||
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
DEMTileNeighbors mask = DEMTileNeighbors(std::pow(2,i));
|
||||
auto mask = DEMTileNeighbors(std::pow(2,i));
|
||||
// only backfill if this neighbor has not been previously backfilled
|
||||
if ((demtile.neighboringTiles & mask) != mask) {
|
||||
OverscaledTileID neighborid = getNeighbor(mask);
|
||||
Tile* renderableNeighbor = tilePyramid.getTile(neighborid);
|
||||
if (renderableNeighbor != nullptr && renderableNeighbor->isRenderable()) {
|
||||
RasterDEMTile& borderTile = static_cast<RasterDEMTile&>(*renderableNeighbor);
|
||||
auto& borderTile = static_cast<RasterDEMTile&>(*renderableNeighbor);
|
||||
demtile.backfillBorder(borderTile, mask);
|
||||
|
||||
// if the border tile has not been backfilled by a previous instance of the main
|
||||
|
||||
@@ -18,7 +18,7 @@ std::shared_ptr<FileSource> FileSource::getSharedFileSource(const ResourceOption
|
||||
it = it->second.expired() ? fileSources.erase(it) : ++it;
|
||||
}
|
||||
|
||||
const uint64_t context = reinterpret_cast<uint64_t>(options.platformContext());
|
||||
const auto context = reinterpret_cast<uint64_t>(options.platformContext());
|
||||
const std::string key = options.baseURL() + '|' + options.accessToken() + '|' + options.cachePath() + '|' + util::toString(context);
|
||||
|
||||
std::shared_ptr<mbgl::FileSource> fileSource;
|
||||
|
||||
@@ -233,7 +233,7 @@ optional<mbgl::Value> serializeLegacyFilter(const Convertible& values) {
|
||||
if (arrayValue) {
|
||||
result.push_back(*arrayValue);
|
||||
} else {
|
||||
result.push_back(NullValue());
|
||||
result.emplace_back(NullValue());
|
||||
}
|
||||
}
|
||||
return (mbgl::Value)result;
|
||||
|
||||
@@ -251,7 +251,7 @@ static optional<std::unique_ptr<Expression>> convertLiteral(type::Type type, con
|
||||
error.message = "value must be an array of numbers";
|
||||
return nullopt;
|
||||
}
|
||||
result.push_back(double(*number));
|
||||
result.emplace_back(double(*number));
|
||||
}
|
||||
return literal(result);
|
||||
},
|
||||
@@ -264,7 +264,7 @@ static optional<std::unique_ptr<Expression>> convertLiteral(type::Type type, con
|
||||
error.message = "value must be an array of strings";
|
||||
return nullopt;
|
||||
}
|
||||
result.push_back(*string);
|
||||
result.emplace_back(*string);
|
||||
}
|
||||
return literal(result);
|
||||
},
|
||||
|
||||
@@ -20,9 +20,9 @@ void CustomTileLoader::fetchTile(const OverscaledTileID& tileID, ActorRef<Custom
|
||||
auto tuple = std::make_tuple(tileID.overscaledZ, tileID.wrap, tileRef);
|
||||
tileCallbackMap.insert({ tileID.canonical, std::vector<OverscaledIDFunctionTuple>(1, tuple) });
|
||||
} else {
|
||||
for (auto iter = tileCallbacks->second.begin(); iter != tileCallbacks->second.end(); iter++) {
|
||||
if (std::get<0>(*iter) == tileID.overscaledZ && std::get<1>(*iter) == tileID.wrap ) {
|
||||
std::get<2>(*iter) = tileRef;
|
||||
for (auto& iter : tileCallbacks->second) {
|
||||
if (std::get<0>(iter) == tileID.overscaledZ && std::get<1>(iter) == tileID.wrap ) {
|
||||
std::get<2>(iter) = tileRef;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -70,8 +70,8 @@ void CustomTileLoader::setTileData(const CanonicalTileID& tileID, const GeoJSON&
|
||||
void CustomTileLoader::invalidateTile(const CanonicalTileID& tileID) {
|
||||
auto tileCallbacks = tileCallbackMap.find(tileID);
|
||||
if (tileCallbacks == tileCallbackMap.end()) { return; }
|
||||
for (auto iter = tileCallbacks->second.begin(); iter != tileCallbacks->second.end(); iter++) {
|
||||
auto actor = std::get<2>(*iter);
|
||||
for (auto& iter : tileCallbacks->second) {
|
||||
auto actor = std::get<2>(iter);
|
||||
actor.invoke(&CustomGeometryTile::invalidateTileData);
|
||||
invokeTileCancel(tileID);
|
||||
}
|
||||
@@ -82,20 +82,20 @@ void CustomTileLoader::invalidateTile(const CanonicalTileID& tileID) {
|
||||
void CustomTileLoader::invalidateRegion(const LatLngBounds& bounds, Range<uint8_t> ) {
|
||||
std::map<uint8_t, util::TileRange> tileRanges;
|
||||
|
||||
for (auto idtuple= tileCallbackMap.begin(); idtuple != tileCallbackMap.end(); idtuple++) {
|
||||
auto zoom = idtuple->first.z;
|
||||
for (auto& idtuple : tileCallbackMap) {
|
||||
auto zoom = idtuple.first.z;
|
||||
auto tileRange = tileRanges.find(zoom);
|
||||
if(tileRange == tileRanges.end()) {
|
||||
tileRange = tileRanges.emplace(std::make_pair(zoom, util::TileRange::fromLatLngBounds(bounds, zoom))).first;
|
||||
}
|
||||
if (tileRange->second.contains(idtuple->first)) {
|
||||
for (auto iter = idtuple->second.begin(); iter != idtuple->second.end(); iter++) {
|
||||
if (tileRange->second.contains(idtuple.first)) {
|
||||
for (auto iter = idtuple.second.begin(); iter != idtuple.second.end(); iter++) {
|
||||
auto actor = std::get<2>(*iter);
|
||||
actor.invoke(&CustomGeometryTile::invalidateTileData);
|
||||
invokeTileCancel(idtuple->first);
|
||||
dataCache.erase(idtuple->first);
|
||||
invokeTileCancel(idtuple.first);
|
||||
dataCache.erase(idtuple.first);
|
||||
}
|
||||
idtuple->second.clear();
|
||||
idtuple.second.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ namespace style {
|
||||
namespace expression {
|
||||
|
||||
EvaluationResult Any::evaluate(const EvaluationContext& params) const {
|
||||
for (auto it = inputs.begin(); it != inputs.end(); it++) {
|
||||
const EvaluationResult result = (*it)->evaluate(params);
|
||||
for (const auto& input : inputs) {
|
||||
const EvaluationResult result = input->evaluate(params);
|
||||
if (!result) return result;
|
||||
if (result->get<bool>()) return EvaluationResult(true);
|
||||
}
|
||||
@@ -34,8 +34,8 @@ std::vector<optional<Value>> Any::possibleOutputs() const {
|
||||
|
||||
|
||||
EvaluationResult All::evaluate(const EvaluationContext& params) const {
|
||||
for (auto it = inputs.begin(); it != inputs.end(); it++) {
|
||||
const EvaluationResult result = (*it)->evaluate(params);
|
||||
for (const auto& input : inputs) {
|
||||
const EvaluationResult result = input->evaluate(params);
|
||||
if (!result) return result;
|
||||
if (!result->get<bool>()) return EvaluationResult(false);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ ParseResult Case::parse(const Convertible& value, ParsingContext& ctx) {
|
||||
outputType = (*output)->getType();
|
||||
}
|
||||
|
||||
branches.push_back(std::make_pair(std::move(*test), std::move(*output)));
|
||||
branches.emplace_back(std::move(*test), std::move(*output));
|
||||
}
|
||||
|
||||
assert(outputType);
|
||||
|
||||
@@ -113,7 +113,7 @@ mbgl::Value Coercion::serialize() const {
|
||||
// by string expressions that get implicitly coerced to "formatted".
|
||||
std::vector<mbgl::Value> serialized{{ std::string("format") }};
|
||||
serialized.push_back(inputs[0]->serialize());
|
||||
serialized.push_back(std::unordered_map<std::string, mbgl::Value>());
|
||||
serialized.emplace_back(std::unordered_map<std::string, mbgl::Value>());
|
||||
return serialized;
|
||||
} else {
|
||||
return Expression::serialize();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <mbgl/style/expression/comparison.hpp>
|
||||
#include <mbgl/style/expression/dsl.hpp>
|
||||
#include <mbgl/style/conversion_impl.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace mbgl {
|
||||
namespace style {
|
||||
@@ -149,7 +150,7 @@ CollatorComparison::CollatorComparison(
|
||||
std::unique_ptr<Expression> rhs_,
|
||||
std::unique_ptr<Expression> collator_)
|
||||
: Expression(Kind::Comparison, type::Boolean),
|
||||
op(op_),
|
||||
op(std::move(op_)),
|
||||
compare(getCollatorComparisonFunction(op)),
|
||||
lhs(std::move(lhs_)),
|
||||
rhs(std::move(rhs_)),
|
||||
|
||||
@@ -41,7 +41,7 @@ std::unique_ptr<Expression> literal(Value value) {
|
||||
std::unique_ptr<Expression> literal(std::initializer_list<double> value) {
|
||||
std::vector<Value> values;
|
||||
for (auto i : value) {
|
||||
values.push_back(i);
|
||||
values.emplace_back(i);
|
||||
}
|
||||
return literal(values);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ std::unique_ptr<Expression> literal(std::initializer_list<double> value) {
|
||||
std::unique_ptr<Expression> literal(std::initializer_list<const char *> value) {
|
||||
std::vector<Value> values;
|
||||
for (auto i : value) {
|
||||
values.push_back(std::string(i));
|
||||
values.emplace_back(std::string(i));
|
||||
}
|
||||
return literal(values);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ mbgl::Value FormatExpression::serialize() const {
|
||||
if (section.textColor) {
|
||||
options.emplace(kFormattedSectionTextColor, (*section.textColor)->serialize());
|
||||
}
|
||||
serialized.push_back(options);
|
||||
serialized.emplace_back(options);
|
||||
}
|
||||
return serialized;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ optional<Formatted> Converter<Formatted>::operator()(const Convertible& value, E
|
||||
}
|
||||
}
|
||||
|
||||
sections.push_back(FormattedSection(*sectionText, fontScale, textFont, textColor));
|
||||
sections.emplace_back(*sectionText, fontScale, textFont, textColor);
|
||||
}
|
||||
return Formatted(sections);
|
||||
} else if (optional<std::string> result = toString(value)) {
|
||||
|
||||
@@ -12,8 +12,8 @@ EvaluationResult Let::evaluate(const EvaluationContext& params) const {
|
||||
}
|
||||
|
||||
void Let::eachChild(const std::function<void(const Expression&)>& visit) const {
|
||||
for (auto it = bindings.begin(); it != bindings.end(); it++) {
|
||||
visit(*it->second);
|
||||
for (const auto& binding : bindings) {
|
||||
visit(*binding.second);
|
||||
}
|
||||
visit(*result);
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ ParseResult parseMatch(const Convertible& value, ParsingContext& ctx) {
|
||||
outputType = (*output)->getType();
|
||||
}
|
||||
|
||||
branches.push_back(std::make_pair(std::move(labels), std::move(*output)));
|
||||
branches.emplace_back(std::move(labels), std::move(*output));
|
||||
}
|
||||
|
||||
auto input = ctx.parse(arrayMember(value, 1), 1, {type::Value});
|
||||
|
||||
@@ -46,13 +46,13 @@ EvaluationResult Step::evaluate(const EvaluationContext& params) const {
|
||||
|
||||
void Step::eachChild(const std::function<void(const Expression&)>& visit) const {
|
||||
visit(*input);
|
||||
for (auto it = stops.begin(); it != stops.end(); it++) {
|
||||
visit(*it->second);
|
||||
for (const auto& stop : stops) {
|
||||
visit(*stop.second);
|
||||
}
|
||||
}
|
||||
|
||||
void Step::eachStop(const std::function<void(double, const Expression&)>& visit) const {
|
||||
for (const auto &stop : stops) {
|
||||
for (const auto& stop : stops) {
|
||||
visit(stop.first, *stop.second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ mbgl::Value ValueConverter<mbgl::Value>::fromExpressionValue(const Value& value)
|
||||
options.emplace("text-color", fromExpressionValue(*section.textColor));
|
||||
}
|
||||
|
||||
serialized.push_back(options);
|
||||
serialized.emplace_back(options);
|
||||
}
|
||||
return serialized;
|
||||
},
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -48,7 +48,7 @@ void RasterSource::loadDescription(FileSource& fileSource) {
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string& url = urlOrTileset.get<std::string>();
|
||||
const auto& url = urlOrTileset.get<std::string>();
|
||||
req = fileSource.request(Resource::source(url), [this, url](Response res) {
|
||||
if (res.error) {
|
||||
observer->onSourceError(*this, std::make_exception_ptr(std::runtime_error(res.error->message)));
|
||||
|
||||
@@ -45,7 +45,7 @@ void VectorSource::loadDescription(FileSource& fileSource) {
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string& url = urlOrTileset.get<std::string>();
|
||||
const auto& url = urlOrTileset.get<std::string>();
|
||||
req = fileSource.request(Resource::source(url), [this, url](Response res) {
|
||||
if (res.error) {
|
||||
observer->onSourceError(*this, std::make_exception_ptr(std::runtime_error(res.error->message)));
|
||||
|
||||
@@ -59,8 +59,7 @@ void TileLayerIndex::findMatches(std::vector<SymbolInstance>& symbolInstances, c
|
||||
}
|
||||
}
|
||||
|
||||
CrossTileSymbolLayerIndex::CrossTileSymbolLayerIndex() {
|
||||
}
|
||||
CrossTileSymbolLayerIndex::CrossTileSymbolLayerIndex() = default;
|
||||
|
||||
/*
|
||||
* Sometimes when a user pans across the antimeridian the longitude value gets wrapped.
|
||||
@@ -163,7 +162,7 @@ bool CrossTileSymbolLayerIndex::removeStaleBuckets(const std::unordered_set<uint
|
||||
return tilesChanged;
|
||||
}
|
||||
|
||||
CrossTileSymbolIndex::CrossTileSymbolIndex() {}
|
||||
CrossTileSymbolIndex::CrossTileSymbolIndex() = default;
|
||||
|
||||
bool CrossTileSymbolIndex::addLayer(const RenderLayerSymbolInterface& symbolInterface, float lng) {
|
||||
|
||||
|
||||
@@ -185,8 +185,8 @@ struct bcp47_parser : qi::grammar<Iterator>
|
||||
};
|
||||
|
||||
LanguageTag LanguageTag::fromBCP47(const std::string& bcp47Tag) {
|
||||
typedef std::string::const_iterator iterator_type;
|
||||
typedef bcp47_parser<iterator_type> bcp47_parser;
|
||||
using iterator_type = std::string::const_iterator;
|
||||
using bcp47_parser = bcp47_parser<iterator_type>;
|
||||
|
||||
bcp47_parser parser;
|
||||
std::string::const_iterator iter = bcp47Tag.begin();
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <mbgl/renderer/buckets/symbol_bucket.hpp>
|
||||
#include <mbgl/renderer/bucket.hpp>
|
||||
#include <mbgl/util/math.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
@@ -62,7 +63,7 @@ Placement::Placement(const TransformState& state_, MapMode mapMode_, style::Tran
|
||||
: collisionIndex(state_)
|
||||
, state(state_)
|
||||
, mapMode(mapMode_)
|
||||
, transitionOptions(transitionOptions_)
|
||||
, transitionOptions(std::move(transitionOptions_))
|
||||
, collisionGroups(crossSourceCollisions)
|
||||
, prevPlacement(std::move(prevPlacement_))
|
||||
{
|
||||
@@ -80,7 +81,7 @@ void Placement::placeLayer(const RenderLayerSymbolInterface& symbolInterface, co
|
||||
continue;
|
||||
}
|
||||
assert(renderTile.tile.kind == Tile::Kind::Geometry);
|
||||
GeometryTile& geometryTile = static_cast<GeometryTile&>(renderTile.tile);
|
||||
auto& geometryTile = static_cast<GeometryTile&>(renderTile.tile);
|
||||
|
||||
auto bucket = symbolInterface.getSymbolBucket(renderTile);
|
||||
if (!bucket) {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <mbgl/style/custom_tile_loader.hpp>
|
||||
|
||||
#include <mapbox/geojsonvt.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
@@ -19,7 +20,7 @@ CustomGeometryTile::CustomGeometryTile(const OverscaledTileID& overscaledTileID,
|
||||
: GeometryTile(overscaledTileID, sourceID_, parameters),
|
||||
necessity(TileNecessity::Optional),
|
||||
options(options_),
|
||||
loader(loader_),
|
||||
loader(std::move(loader_)),
|
||||
mailbox(std::make_shared<Mailbox>(*Scheduler::GetCurrent())),
|
||||
actorRef(*this, mailbox) {
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <mbgl/util/stopwatch.hpp>
|
||||
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
@@ -29,7 +30,7 @@ using namespace style;
|
||||
GeometryTileWorker::GeometryTileWorker(ActorRef<GeometryTileWorker> self_,
|
||||
ActorRef<GeometryTile> parent_,
|
||||
OverscaledTileID id_,
|
||||
const std::string& sourceID_,
|
||||
std::string sourceID_,
|
||||
const std::atomic<bool>& obsolete_,
|
||||
const MapMode mode_,
|
||||
const float pixelRatio_,
|
||||
@@ -37,7 +38,7 @@ GeometryTileWorker::GeometryTileWorker(ActorRef<GeometryTileWorker> self_,
|
||||
: self(std::move(self_)),
|
||||
parent(std::move(parent_)),
|
||||
id(std::move(id_)),
|
||||
sourceID(sourceID_),
|
||||
sourceID(std::move(sourceID_)),
|
||||
obsolete(obsolete_),
|
||||
mode(mode_),
|
||||
pixelRatio(pixelRatio_),
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
GeometryTileWorker(ActorRef<GeometryTileWorker> self,
|
||||
ActorRef<GeometryTile> parent,
|
||||
OverscaledTileID,
|
||||
const std::string&,
|
||||
std::string,
|
||||
const std::atomic<bool>&,
|
||||
const MapMode,
|
||||
const float pixelRatio,
|
||||
|
||||
@@ -78,7 +78,7 @@ std::string toPaddedHex(T x) {
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace
|
||||
|
||||
std::string toHex(size_t value) {
|
||||
return toPaddedHex(value);
|
||||
|
||||
@@ -237,9 +237,7 @@ TileCover::TileCover(const Geometry<double>& geom, int32_t z, bool project/* = t
|
||||
: impl( std::make_unique<TileCover::Impl>(z, geom, project)) {
|
||||
}
|
||||
|
||||
TileCover::~TileCover() {
|
||||
|
||||
}
|
||||
TileCover::~TileCover() = default;
|
||||
|
||||
optional<UnwrappedTileID> TileCover::next() {
|
||||
return impl->next();
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include <functional>
|
||||
#include <cmath>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
#include <algorithm>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
Reference in New Issue
Block a user