From aa3d6dd09fb2ecf4a5bf91536ca67b4f71b24613 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 15 Dec 2021 15:29:46 +0100 Subject: many: switch from using std::unique_ptr::get() to &*ptr --- spline/spline-widget.cpp | 2 +- spline/spline.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'spline') diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp index 7a962182..d26fb13f 100644 --- a/spline/spline-widget.cpp +++ b/spline/spline-widget.cpp @@ -49,7 +49,7 @@ void spline_widget::set_config(base_spline* spl) if (spl) { std::shared_ptr s = spl->get_settings(); - connection = connect(s.get(), &base_settings::recomputed, + connection = connect(&*s, &base_settings::recomputed, this, [this] { reload_spline(); }, Qt::QueuedConnection); } diff --git a/spline/spline.cpp b/spline/spline.cpp index 9f92c074..ecbfc3a0 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -391,11 +391,11 @@ void spline::set_bundle(bundle b, const QString& axis_name, Axis axis) S = s; conn_points = QObject::connect(&s->points, value_::value_changed>(), - ctx.get(), [this] { invalidate_settings(); }, Qt::DirectConnection); + &*ctx, [this] { invalidate_settings(); }, Qt::DirectConnection); conn_maxx = QObject::connect(&s->opts.clamp_x_, value_::value_changed(), - ctx.get(), [this](double) { invalidate_settings(); }, Qt::DirectConnection); + &*ctx, [this](double) { invalidate_settings(); }, Qt::DirectConnection); conn_maxy = QObject::connect(&s->opts.clamp_y_, value_::value_changed(), - ctx.get(), [this](double) { invalidate_settings(); }, Qt::DirectConnection); + &*ctx, [this](double) { invalidate_settings(); }, Qt::DirectConnection); } emit S->recomputed(); -- cgit v1.2.3