diff options
Diffstat (limited to 'spline')
| -rw-r--r-- | spline/spline-widget.cpp | 2 | ||||
| -rw-r--r-- | spline/spline.cpp | 4 | ||||
| -rw-r--r-- | spline/spline.hpp | 6 | 
3 files changed, 6 insertions, 6 deletions
| diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp index fef03e82..c71626f0 100644 --- a/spline/spline-widget.cpp +++ b/spline/spline-widget.cpp @@ -59,7 +59,7 @@ void spline_widget::setConfig(spline* spl)          if (spl)          { -            mem<spline::settings> s = spl->get_settings(); +            std::shared_ptr<spline::settings> s = spl->get_settings();              connection = connect(s.get(), &spline::settings::recomputed,                                   this, [this]() { reload_spline(); },                                   Qt::QueuedConnection); diff --git a/spline/spline.cpp b/spline/spline.cpp index 58703e02..c1f09db8 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -428,13 +428,13 @@ void spline::recompute()  }  // the return value is only safe to use with no spline::set_bundle calls -mem<spline::settings> spline::get_settings() +std::shared_ptr<spline::settings> spline::get_settings()  {      QMutexLocker foo(&_mutex);      return s;  } -mem<const spline::settings> spline::get_settings() const +std::shared_ptr<const spline::settings> spline::get_settings() const  {      QMutexLocker foo(&_mutex);      return s; diff --git a/spline/spline.hpp b/spline/spline.hpp index 146837c8..acb1861a 100644 --- a/spline/spline.hpp +++ b/spline/spline.hpp @@ -52,7 +52,7 @@ class OTR_SPLINE_EXPORT spline final      static QPointF ensure_in_bounds(const QList<QPointF>& points, double max_x, int i);      static int element_count(const QList<QPointF>& points, double max_x); -    mem<spline_detail::settings> s; +    std::shared_ptr<spline_detail::settings> s;      QMetaObject::Connection connection;      std::vector<float> data; @@ -99,8 +99,8 @@ public:      bundle get_bundle();      void recompute(); -    mem<settings> get_settings(); -    mem<const settings> get_settings() const; +    std::shared_ptr<settings> get_settings(); +    std::shared_ptr<const settings> get_settings() const;      using points_t = decltype(s->points());      int get_point_count() const; | 
