summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-18 15:11:05 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-18 16:21:59 +0300
commit30e659beed5a5dcb286df79280620bc799086523 (patch)
treeca5e058ece6e68e5b15225c67fa2790511a510af
parente3137d86d2d873bf0894c438a51510575d7ecc7a (diff)
downloadqtlocation-mapboxgl-30e659beed5a5dcb286df79280620bc799086523.tar.gz
[core] Fix formatting
-rw-r--r--src/mbgl/style/layer.cpp15
-rw-r--r--src/mbgl/style/layers/background_layer.cpp16
-rw-r--r--src/mbgl/style/layers/circle_layer.cpp16
-rw-r--r--src/mbgl/style/layers/custom_layer.cpp15
-rw-r--r--src/mbgl/style/layers/fill_extrusion_layer.cpp16
-rw-r--r--src/mbgl/style/layers/fill_layer.cpp16
-rw-r--r--src/mbgl/style/layers/heatmap_layer.cpp16
-rw-r--r--src/mbgl/style/layers/hillshade_layer.cpp16
-rw-r--r--src/mbgl/style/layers/layer.cpp.ejs6
-rw-r--r--src/mbgl/style/layers/line_layer.cpp16
-rw-r--r--src/mbgl/style/layers/raster_layer.cpp16
-rw-r--r--src/mbgl/style/layers/symbol_layer.cpp16
12 files changed, 81 insertions, 99 deletions
diff --git a/src/mbgl/style/layer.cpp b/src/mbgl/style/layer.cpp
index 2f4d50cd83..04a897022c 100644
--- a/src/mbgl/style/layer.cpp
+++ b/src/mbgl/style/layer.cpp
@@ -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;
diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp
index f91d8f8493..2b33b0b3d0 100644
--- a/src/mbgl/style/layers/background_layer.cpp
+++ b/src/mbgl/style/layers/background_layer.cpp
@@ -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;
}
diff --git a/src/mbgl/style/layers/circle_layer.cpp b/src/mbgl/style/layers/circle_layer.cpp
index aba6b897b1..baabe5c8bf 100644
--- a/src/mbgl/style/layers/circle_layer.cpp
+++ b/src/mbgl/style/layers/circle_layer.cpp
@@ -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;
}
diff --git a/src/mbgl/style/layers/custom_layer.cpp b/src/mbgl/style/layers/custom_layer.cpp
index 7e58b8e4e1..8b9e17ea25 100644
--- a/src/mbgl/style/layers/custom_layer.cpp
+++ b/src/mbgl/style/layers/custom_layer.cpp
@@ -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,
diff --git a/src/mbgl/style/layers/fill_extrusion_layer.cpp b/src/mbgl/style/layers/fill_extrusion_layer.cpp
index 5214b275fb..b22f0a3075 100644
--- a/src/mbgl/style/layers/fill_extrusion_layer.cpp
+++ b/src/mbgl/style/layers/fill_extrusion_layer.cpp
@@ -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;
}
diff --git a/src/mbgl/style/layers/fill_layer.cpp b/src/mbgl/style/layers/fill_layer.cpp
index 63371b34f0..2c3ee42fae 100644
--- a/src/mbgl/style/layers/fill_layer.cpp
+++ b/src/mbgl/style/layers/fill_layer.cpp
@@ -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;
}
diff --git a/src/mbgl/style/layers/heatmap_layer.cpp b/src/mbgl/style/layers/heatmap_layer.cpp
index da4f6a35a4..a3cedd3747 100644
--- a/src/mbgl/style/layers/heatmap_layer.cpp
+++ b/src/mbgl/style/layers/heatmap_layer.cpp
@@ -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;
}
diff --git a/src/mbgl/style/layers/hillshade_layer.cpp b/src/mbgl/style/layers/hillshade_layer.cpp
index e96e0f1839..05dd009d25 100644
--- a/src/mbgl/style/layers/hillshade_layer.cpp
+++ b/src/mbgl/style/layers/hillshade_layer.cpp
@@ -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;
}
diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs
index c63999ca32..eee2d0583e 100644
--- a/src/mbgl/style/layers/layer.cpp.ejs
+++ b/src/mbgl/style/layers/layer.cpp.ejs
@@ -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;
}
diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp
index f376765085..c148a66407 100644
--- a/src/mbgl/style/layers/line_layer.cpp
+++ b/src/mbgl/style/layers/line_layer.cpp
@@ -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;
}
diff --git a/src/mbgl/style/layers/raster_layer.cpp b/src/mbgl/style/layers/raster_layer.cpp
index a98919b24a..b85d031938 100644
--- a/src/mbgl/style/layers/raster_layer.cpp
+++ b/src/mbgl/style/layers/raster_layer.cpp
@@ -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;
}
diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp
index fbf7c1e958..35d75686af 100644
--- a/src/mbgl/style/layers/symbol_layer.cpp
+++ b/src/mbgl/style/layers/symbol_layer.cpp
@@ -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;
}