diff options
-rw-r--r-- | include/mbgl/util/image.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/util/vec.hpp | 8 | ||||
-rw-r--r-- | platform/default/async_task.cpp | 3 | ||||
-rw-r--r-- | platform/default/timer.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/renderer/bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/painter.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/util/rect.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/util/transition.cpp | 2 |
8 files changed, 11 insertions, 14 deletions
diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp index 6188f6a404..fde42c7c5e 100644 --- a/include/mbgl/util/image.hpp +++ b/include/mbgl/util/image.hpp @@ -14,7 +14,7 @@ enum ImageAlphaMode { template <ImageAlphaMode Mode> class Image { public: - Image() {} + Image() = default; Image(size_t w, size_t h) : width(w), diff --git a/include/mbgl/util/vec.hpp b/include/mbgl/util/vec.hpp index 63fac9e032..a59a4162f9 100644 --- a/include/mbgl/util/vec.hpp +++ b/include/mbgl/util/vec.hpp @@ -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 { diff --git a/platform/default/async_task.cpp b/platform/default/async_task.cpp index c75cc3f1ca..c8fb4dcd13 100644 --- a/platform/default/async_task.cpp +++ b/platform/default/async_task.cpp @@ -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(); diff --git a/platform/default/timer.cpp b/platform/default/timer.cpp index 969f6e7890..774c1bb97e 100644 --- a/platform/default/timer.cpp +++ b/platform/default/timer.cpp @@ -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(), diff --git a/src/mbgl/renderer/bucket.hpp b/src/mbgl/renderer/bucket.hpp index f99f2a7a62..b7cbfdf0fe 100644 --- a/src/mbgl/renderer/bucket.hpp +++ b/src/mbgl/renderer/bucket.hpp @@ -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; diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp index 49b4526f58..e4991b8086 100644 --- a/src/mbgl/renderer/painter.cpp +++ b/src/mbgl/renderer/painter.cpp @@ -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()); diff --git a/src/mbgl/util/rect.hpp b/src/mbgl/util/rect.hpp index 71d8078447..7bb3214b9b 100644 --- a/src/mbgl/util/rect.hpp +++ b/src/mbgl/util/rect.hpp @@ -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; diff --git a/src/mbgl/util/transition.cpp b/src/mbgl/util/transition.cpp index 79611f5348..16e13108d2 100644 --- a/src/mbgl/util/transition.cpp +++ b/src/mbgl/util/transition.cpp @@ -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 { |