[core] use default instead of empty function body
This commit is contained in:
@@ -14,7 +14,7 @@ enum ImageAlphaMode {
|
||||
template <ImageAlphaMode Mode>
|
||||
class Image {
|
||||
public:
|
||||
Image() {}
|
||||
Image() = default;
|
||||
|
||||
Image(size_t w, size_t h)
|
||||
: width(w),
|
||||
|
||||
@@ -16,7 +16,7 @@ struct vec2 {
|
||||
|
||||
T x, y;
|
||||
|
||||
inline vec2() {}
|
||||
inline vec2() = default;
|
||||
|
||||
template<typename U = T, typename std::enable_if<std::numeric_limits<U>::has_quiet_NaN, int>::type = 0>
|
||||
inline vec2(null) : x(std::numeric_limits<T>::quiet_NaN()), y(std::numeric_limits<T>::quiet_NaN()) {}
|
||||
@@ -24,7 +24,7 @@ struct vec2 {
|
||||
template<typename U = T, typename std::enable_if<!std::numeric_limits<U>::has_quiet_NaN, int>::type = 0>
|
||||
inline vec2(null) : x(std::numeric_limits<T>::min()), y(std::numeric_limits<T>::min()) {}
|
||||
|
||||
inline vec2(const vec2& o) : x(o.x), y(o.y) {}
|
||||
inline vec2(const vec2& o) = default;
|
||||
|
||||
template<typename U>
|
||||
inline vec2(const U& u) : x(u.x), y(u.y) {}
|
||||
@@ -99,7 +99,7 @@ template <typename T = double>
|
||||
struct vec3 {
|
||||
T x, y, z;
|
||||
|
||||
inline vec3() {}
|
||||
inline vec3() = default;
|
||||
inline vec3(const vec3& o) : x(o.x), y(o.y), z(o.z) {}
|
||||
inline vec3(T x_, T y_, T z_) : x(x_), y(y_), z(z_) {}
|
||||
inline bool operator==(const vec3& rhs) const {
|
||||
@@ -111,7 +111,7 @@ template <typename T = double>
|
||||
struct vec4 {
|
||||
T x, y, z, w;
|
||||
|
||||
inline vec4() {}
|
||||
inline vec4() = default;
|
||||
inline vec4(const vec4& o) : x(o.x), y(o.y), z(o.z), w(o.w) {}
|
||||
inline vec4(T x_, T y_, T z_, T w_) : x(x_), y(y_), z(z_), w(w_) {}
|
||||
inline bool operator==(const vec4& rhs) const {
|
||||
|
||||
@@ -65,8 +65,7 @@ AsyncTask::AsyncTask(std::function<void()>&& fn)
|
||||
: impl(std::make_unique<Impl>(std::move(fn))) {
|
||||
}
|
||||
|
||||
AsyncTask::~AsyncTask() {
|
||||
}
|
||||
AsyncTask::~AsyncTask() = default;
|
||||
|
||||
void AsyncTask::send() {
|
||||
impl->maySend();
|
||||
|
||||
@@ -66,8 +66,7 @@ Timer::Timer()
|
||||
: impl(std::make_unique<Impl>()) {
|
||||
}
|
||||
|
||||
Timer::~Timer() {
|
||||
}
|
||||
Timer::~Timer() = default;
|
||||
|
||||
void Timer::start(Duration timeout, Duration repeat, std::function<void()>&& cb) {
|
||||
impl->start(std::chrono::duration_cast<std::chrono::milliseconds>(timeout).count(),
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
// once or twice (for Opaque and Transparent render passes).
|
||||
virtual void render(Painter&, const StyleLayer&, const TileID&, const mat4&) = 0;
|
||||
|
||||
virtual ~Bucket() {}
|
||||
virtual ~Bucket() = default;
|
||||
|
||||
virtual bool hasData() const = 0;
|
||||
|
||||
|
||||
@@ -48,8 +48,7 @@ Painter::Painter(MapData& data_, TransformState& state_)
|
||||
setup();
|
||||
}
|
||||
|
||||
Painter::~Painter() {
|
||||
}
|
||||
Painter::~Painter() = default;
|
||||
|
||||
bool Painter::needsAnimation() const {
|
||||
return frameHistory.needsAnimation(data.getDefaultFadeDuration());
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace mbgl {
|
||||
|
||||
template <typename T>
|
||||
struct Rect {
|
||||
inline Rect() {}
|
||||
inline Rect() = default;
|
||||
inline Rect(T x_, T y_, T w_, T h_) : x(x_), y(y_), w(w_), h(h_) {}
|
||||
T x = 0, y = 0;
|
||||
T w = 0, h = 0;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace mbgl { namespace util {
|
||||
|
||||
UnitBezier ease(0, 0, 0.25, 1);
|
||||
|
||||
transition::~transition() {}
|
||||
transition::~transition() = default;
|
||||
|
||||
template <typename T>
|
||||
transition::state ease_transition<T>::update(const TimePoint& now) const {
|
||||
|
||||
Reference in New Issue
Block a user