Skip to content
Snippets Groups Projects
Verified Commit 0987d8d7 authored by Benny Baumann's avatar Benny Baumann
Browse files

dbg: Remove enable_shared_from_this for a moment

parent 2356c76a
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -15,7 +15,7 @@ namespace rmrf::ui {
* It implements some basic information handling and a registry for
* views.
*/
class display : public std::enable_shared_from_this<display> {
class display { // : public std::enable_shared_from_this<display> {
public:
typedef display self_type;
typedef std::shared_ptr<self_type> ptr_type;
......@@ -34,7 +34,7 @@ public:
decltype(auto) sync(F &&f, Args &&... args) {
lock_type lock(m);
return std::forward<F>(f)(shared_from_this(), std::forward<Args>(args)...);
return std::forward<F>(f)(nullptr /*shared_from_this()*/, std::forward<Args>(args)...);
}
};
......
......@@ -7,7 +7,7 @@ namespace rmrf::ui {
view::view(const std::shared_ptr<view> &parent) : parent_view{parent}, child_views{} {
if (this->parent_view) {
this->parent_view->add_child(this->shared_from_this());
// this->parent_view->add_child(this->shared_from_this());
}
}
......@@ -17,7 +17,7 @@ view::~view() {
// Notify our parent about us being destructed
if (this->parent_view) {
this->parent_view->remove_child(this->shared_from_this());
// this->parent_view->remove_child(this->shared_from_this());
}
}
......
......@@ -14,7 +14,7 @@ namespace rmrf::ui {
/**
* This abstract class implements a view page.
*/
class view : public ui_context, public std::enable_shared_from_this<view> {
class view : public ui_context { //, public std::enable_shared_from_this<view> {
private:
std::shared_ptr<view> parent_view;
std::list<std::shared_ptr<view>> child_views;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment