[core] Fix readability-redundant-member-init errors in header files
As reported by clang-tidy-8.
This commit is contained in:
@@ -61,7 +61,7 @@ public:
|
||||
virtual void deinitialize() = 0;
|
||||
};
|
||||
|
||||
class CustomLayer : public Layer {
|
||||
class CustomLayer final : public Layer {
|
||||
public:
|
||||
CustomLayer(const std::string& id,
|
||||
std::unique_ptr<CustomLayerHost> host);
|
||||
|
||||
@@ -18,8 +18,8 @@ public:
|
||||
private:
|
||||
optional<mbgl::Value> legacyFilter;
|
||||
public:
|
||||
Filter() : expression() {}
|
||||
|
||||
Filter() {}
|
||||
|
||||
Filter(expression::ParseResult _expression, optional<mbgl::Value> _filter = {})
|
||||
: expression(std::move(*_expression)),
|
||||
legacyFilter(std::move(_filter)){
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class BackgroundLayer : public Layer {
|
||||
class BackgroundLayer final : public Layer {
|
||||
public:
|
||||
BackgroundLayer(const std::string& layerID);
|
||||
~BackgroundLayer() final;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class CircleLayer : public Layer {
|
||||
class CircleLayer final : public Layer {
|
||||
public:
|
||||
CircleLayer(const std::string& layerID, const std::string& sourceID);
|
||||
~CircleLayer() final;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class FillExtrusionLayer : public Layer {
|
||||
class FillExtrusionLayer final : public Layer {
|
||||
public:
|
||||
FillExtrusionLayer(const std::string& layerID, const std::string& sourceID);
|
||||
~FillExtrusionLayer() final;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class FillLayer : public Layer {
|
||||
class FillLayer final : public Layer {
|
||||
public:
|
||||
FillLayer(const std::string& layerID, const std::string& sourceID);
|
||||
~FillLayer() final;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class HeatmapLayer : public Layer {
|
||||
class HeatmapLayer final : public Layer {
|
||||
public:
|
||||
HeatmapLayer(const std::string& layerID, const std::string& sourceID);
|
||||
~HeatmapLayer() final;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class HillshadeLayer : public Layer {
|
||||
class HillshadeLayer final : public Layer {
|
||||
public:
|
||||
HillshadeLayer(const std::string& layerID, const std::string& sourceID);
|
||||
~HillshadeLayer() final;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class <%- camelize(type) %>Layer : public Layer {
|
||||
class <%- camelize(type) %>Layer final : public Layer {
|
||||
public:
|
||||
<% if ((type === 'background') || (type === 'location-indicator')) { -%>
|
||||
<%- camelize(type) %>Layer(const std::string& layerID);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class LineLayer : public Layer {
|
||||
class LineLayer final : public Layer {
|
||||
public:
|
||||
LineLayer(const std::string& layerID, const std::string& sourceID);
|
||||
~LineLayer() final;
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class LocationIndicatorLayer : public Layer {
|
||||
class LocationIndicatorLayer final : public Layer {
|
||||
public:
|
||||
LocationIndicatorLayer(const std::string& layerID);
|
||||
~LocationIndicatorLayer() final;
|
||||
~LocationIndicatorLayer();
|
||||
|
||||
// Layout properties
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class RasterLayer : public Layer {
|
||||
class RasterLayer final : public Layer {
|
||||
public:
|
||||
RasterLayer(const std::string& layerID, const std::string& sourceID);
|
||||
~RasterLayer() final;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace style {
|
||||
|
||||
class TransitionOptions;
|
||||
|
||||
class SymbolLayer : public Layer {
|
||||
class SymbolLayer final : public Layer {
|
||||
public:
|
||||
SymbolLayer(const std::string& layerID, const std::string& sourceID);
|
||||
~SymbolLayer() final;
|
||||
|
||||
@@ -33,8 +33,7 @@ public:
|
||||
zoomRange(zoomRange_),
|
||||
attribution(std::move(attribution_)),
|
||||
scheme(scheme_),
|
||||
encoding(encoding_),
|
||||
bounds(){};
|
||||
encoding(encoding_){};
|
||||
|
||||
// TileJSON also includes center and zoom but they are not used by mbgl.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace mbgl {
|
||||
|
||||
class Mailbox;
|
||||
|
||||
class FileSourceRequest : public AsyncRequest {
|
||||
class FileSourceRequest final : public AsyncRequest {
|
||||
public:
|
||||
FileSourceRequest(FileSource::Callback&& callback);
|
||||
~FileSourceRequest() final;
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
GLXFBConfig* fbConfigs = nullptr;
|
||||
};
|
||||
|
||||
class GLXBackendImpl : public HeadlessBackend::Impl {
|
||||
class GLXBackendImpl final : public HeadlessBackend::Impl {
|
||||
public:
|
||||
GLXBackendImpl() {
|
||||
// Try to create a legacy context.
|
||||
|
||||
@@ -26,7 +26,7 @@ struct StillImageRequest {
|
||||
Map::StillImageCallback callback;
|
||||
};
|
||||
|
||||
class Map::Impl : public style::Observer, public RendererObserver {
|
||||
class Map::Impl final : public style::Observer, public RendererObserver {
|
||||
public:
|
||||
Impl(RendererFrontend&, MapObserver&, std::shared_ptr<FileSource>, const MapOptions&);
|
||||
~Impl() final;
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
explicit PropertyEvaluationParameters(float z_)
|
||||
: z(z_),
|
||||
now(Clock::time_point::max()),
|
||||
zoomHistory(),
|
||||
|
||||
defaultFadeDuration(0) {}
|
||||
|
||||
PropertyEvaluationParameters(ZoomHistory zoomHistory_, TimePoint now_, Duration defaultFadeDuration_)
|
||||
|
||||
@@ -11,7 +11,7 @@ class CanonicalTileID;
|
||||
|
||||
namespace style {
|
||||
|
||||
class GeoJSONSource::Impl : public Source::Impl {
|
||||
class GeoJSONSource::Impl final : public Source::Impl {
|
||||
public:
|
||||
Impl(std::string id, Immutable<GeoJSONOptions>);
|
||||
Impl(const GeoJSONSource::Impl&, std::shared_ptr<GeoJSONData>);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace mbgl {
|
||||
|
||||
namespace style {
|
||||
|
||||
class ImageSource::Impl : public Source::Impl {
|
||||
class ImageSource::Impl final : public Source::Impl {
|
||||
public:
|
||||
Impl(std::string id, std::array<LatLng, 4> coords);
|
||||
Impl(const Impl& other, std::array<LatLng, 4> coords);
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
template <class... Args>
|
||||
GeometryCoordinates(Args&&... args) : std::vector<GeometryCoordinate>(std::forward<Args>(args)...) {}
|
||||
GeometryCoordinates(std::initializer_list<GeometryCoordinate> args) : std::vector<GeometryCoordinate>(args) {}
|
||||
GeometryCoordinates() = default;
|
||||
};
|
||||
|
||||
class GeometryCollection : public std::vector<GeometryCoordinates> {
|
||||
@@ -35,6 +36,7 @@ public:
|
||||
GeometryCollection(std::initializer_list<GeometryCoordinates> args) : std::vector<GeometryCoordinates>(args) {}
|
||||
GeometryCollection(GeometryCollection&&) = default;
|
||||
GeometryCollection& operator=(GeometryCollection&&) = default;
|
||||
GeometryCollection() = default;
|
||||
|
||||
GeometryCollection clone() const { return GeometryCollection(*this); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user