[core] Fix modernize-use-equals-default 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 7751e4be76
commit 542c11ae63
6 changed files with 7 additions and 7 deletions

View File

@@ -89,7 +89,7 @@ struct AnimationOptions {
std::function<void()> transitionFinishFn;
/** Creates an animation with no options specified. */
AnimationOptions() {}
AnimationOptions() = default;
/** Creates an animation with the specified duration. */
AnimationOptions(Duration d)

View File

@@ -18,7 +18,7 @@ public:
private:
optional<mbgl::Value> legacyFilter;
public:
Filter() {}
Filter() = default;
Filter(expression::ParseResult _expression, optional<mbgl::Value> _filter = {})
: expression(std::move(*_expression)),

View File

@@ -97,7 +97,7 @@ public:
struct NodeFileSource : public mbgl::FileSource {
NodeFileSource(NodeMap* nodeMap_) : nodeMap(nodeMap_) {}
~NodeFileSource() {}
~NodeFileSource() = default;
std::unique_ptr<mbgl::AsyncRequest> request(const mbgl::Resource&, mbgl::FileSource::Callback) final;
bool canRequest(const mbgl::Resource&) const override;
NodeMap* nodeMap;

View File

@@ -22,7 +22,7 @@ public:
q->process();
});
}
~AsyncQueue() {}
~AsyncQueue() = default;
void send(T &&data) {
{

View File

@@ -30,8 +30,7 @@ namespace mbgl {
{}
PlacedGlyph(PlacedGlyph&& other) noexcept
: point(other.point), angle(other.angle), tileDistance(std::move(other.tileDistance)) {}
PlacedGlyph(const PlacedGlyph& other)
: point(other.point), angle(other.angle), tileDistance(other.tileDistance) {}
PlacedGlyph(const PlacedGlyph& other) = default;
Point<float> point;
float angle;
optional<TileDistance> tileDistance;

View File

@@ -36,9 +36,10 @@ public:
private:
union Geometry {
// NOLINTNEXTLINE(modernize-use-equals-default)
Geometry() {}
Geometry(float x1, float y1, float x2, float y2) : box({x1, y1}, {x2, y2}) {}
Geometry(float x, float y, float r) : circle({x, y}, r) {}
Geometry() {}
mapbox::geometry::box<float> box;
geometry::circle<float> circle;
} geometry;