[core] Fix readability-redundant-member-init errors in header files

As reported by clang-tidy-8.
This commit is contained in:
Thiago Marcos P. Santos
2020-03-27 18:30:35 +02:00
parent dffe00feea
commit c4cb026fa4
21 changed files with 24 additions and 23 deletions

View File

@@ -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;

View File

@@ -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_)

View File

@@ -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>);

View File

@@ -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);

View File

@@ -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); }