[core] Fix formatting
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include <mbgl/style/layer.hpp>
|
||||
#include <mbgl/style/layer_impl.hpp>
|
||||
#include <mbgl/style/layer_observer.hpp>
|
||||
#include <mbgl/style/conversion/constant.hpp>
|
||||
#include <mbgl/style/conversion/filter.hpp>
|
||||
#include <mbgl/style/conversion_impl.hpp>
|
||||
#include <mbgl/style/layer.hpp>
|
||||
#include <mbgl/style/layer_impl.hpp>
|
||||
#include <mbgl/style/layer_observer.hpp>
|
||||
#include <mbgl/tile/tile.hpp>
|
||||
|
||||
#include <mbgl/renderer/render_layer.hpp>
|
||||
@@ -11,9 +11,12 @@
|
||||
namespace mbgl {
|
||||
namespace style {
|
||||
|
||||
static_assert(mbgl::underlying_type(Tile::Kind::Geometry) == mbgl::underlying_type(LayerTypeInfo::TileKind::Geometry), "tile kind error");
|
||||
static_assert(mbgl::underlying_type(Tile::Kind::Raster) == mbgl::underlying_type(LayerTypeInfo::TileKind::Raster), "tile kind error");
|
||||
static_assert(mbgl::underlying_type(Tile::Kind::RasterDEM) == mbgl::underlying_type(LayerTypeInfo::TileKind::RasterDEM), "tile kind error");
|
||||
static_assert(mbgl::underlying_type(Tile::Kind::Geometry) == mbgl::underlying_type(LayerTypeInfo::TileKind::Geometry),
|
||||
"tile kind error");
|
||||
static_assert(mbgl::underlying_type(Tile::Kind::Raster) == mbgl::underlying_type(LayerTypeInfo::TileKind::Raster),
|
||||
"tile kind error");
|
||||
static_assert(mbgl::underlying_type(Tile::Kind::RasterDEM) == mbgl::underlying_type(LayerTypeInfo::TileKind::RasterDEM),
|
||||
"tile kind error");
|
||||
|
||||
static LayerObserver nullObserver;
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* BackgroundLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"background",
|
||||
LayerTypeInfo::Source::NotRequired,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::NotRequired
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"background",
|
||||
LayerTypeInfo::Source::NotRequired,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::NotRequired};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* CircleLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"circle",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"circle",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,13 @@ namespace mbgl {
|
||||
namespace style {
|
||||
|
||||
namespace {
|
||||
const LayerTypeInfo typeInfoCustom
|
||||
{ "",
|
||||
LayerTypeInfo::Source::NotRequired,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::NotRequired };
|
||||
const LayerTypeInfo typeInfoCustom{"",
|
||||
LayerTypeInfo::Source::NotRequired,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::NotRequired};
|
||||
} // namespace
|
||||
|
||||
CustomLayer::CustomLayer(const std::string& layerID,
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* FillExtrusionLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"fill-extrusion",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"fill-extrusion",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* FillLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"fill",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"fill",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* HeatmapLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"heatmap",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"heatmap",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* HillshadeLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"hillshade",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::RasterDEM
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"hillshade",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::RasterDEM};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,10 +80,8 @@ layerCapabilities['raster'] = defaults.require('Source').set('TileKind',
|
||||
%>
|
||||
// static
|
||||
const LayerTypeInfo* <%- camelize(type) %>Layer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"<%- type %>",
|
||||
<%-`${layerCapabilities[type].map(cap => `LayerTypeInfo::${cap}`).join(',\n ')}` %>
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"<%- type %>",
|
||||
<%-`${layerCapabilities[type].map(cap => `LayerTypeInfo::${cap}`).join(',\n ')}` %>};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* LineLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"line",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"line",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Geometry};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* RasterLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"raster",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Raster
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"raster",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired,
|
||||
LayerTypeInfo::CrossTileIndex::NotRequired,
|
||||
LayerTypeInfo::TileKind::Raster};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace style {
|
||||
|
||||
// static
|
||||
const LayerTypeInfo* SymbolLayer::Impl::staticTypeInfo() noexcept {
|
||||
const static LayerTypeInfo typeInfo
|
||||
{"symbol",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::FadingTiles::Required,
|
||||
LayerTypeInfo::CrossTileIndex::Required,
|
||||
LayerTypeInfo::TileKind::Geometry
|
||||
};
|
||||
const static LayerTypeInfo typeInfo{"symbol",
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::FadingTiles::Required,
|
||||
LayerTypeInfo::CrossTileIndex::Required,
|
||||
LayerTypeInfo::TileKind::Geometry};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user