summaryrefslogtreecommitdiffhomepage
path: root/spline
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-08-27 17:01:54 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-08-27 17:01:54 +0200
commit95100251a8146a7be956669e12b33dfffb1898ab (patch)
treec5370c83816ddc9969dff25bf49cf2fd520bad06 /spline
parented4e090433b0f6f21059e876a0ebb72c7757e3d8 (diff)
spline: modernize
Diffstat (limited to 'spline')
-rw-r--r--spline/spline.cpp3
-rw-r--r--spline/spline.hpp12
2 files changed, 7 insertions, 8 deletions
diff --git a/spline/spline.cpp b/spline/spline.cpp
index 69928834..2fb811d6 100644
--- a/spline/spline.cpp
+++ b/spline/spline.cpp
@@ -486,9 +486,8 @@ double spline::bucket_size_coefficient(const QList<QPointF>& points) const
namespace spline_detail {
-settings::settings(bundle b, const QString& axis_name, Axis idx):
+settings::settings(bundle const& b, const QString& axis_name, Axis idx):
b(b ? b : make_bundle("")),
- points(b, "points", {}),
opts(axis_name, idx)
{}
diff --git a/spline/spline.hpp b/spline/spline.hpp
index b7b3ce5b..fe2852f2 100644
--- a/spline/spline.hpp
+++ b/spline/spline.hpp
@@ -42,9 +42,9 @@ class OTR_SPLINE_EXPORT settings final : public base_settings
{
public:
bundle b;
- value<QList<QPointF>> points;
+ value<QList<QPointF>> points { b, "points", {} };
axis_opts opts;
- settings(bundle b, const QString& axis_name, Axis idx);
+ settings(bundle const& b, const QString& axis_name, Axis idx);
~settings() override;
};
@@ -132,7 +132,7 @@ public:
spline();
spline(const QString& name, const QString& axis_name, Axis axis);
- ~spline();
+ ~spline() override;
spline& operator=(const spline&) = default;
spline(const spline&) = default;
@@ -161,9 +161,9 @@ public:
using settings = spline_detail::settings;
};
-inline base_spline_::~base_spline_() {}
-inline spline_modify_mixin::~spline_modify_mixin() {}
-inline spline_settings_mixin::~spline_settings_mixin() {}
+inline base_spline_::~base_spline_() = default;
+inline spline_modify_mixin::~spline_modify_mixin() = default;
+inline spline_settings_mixin::~spline_settings_mixin() = default;
} // ns spline_detail