diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-24 20:47:16 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-24 20:47:16 +0100 |
commit | bc64f8c5020f1ff332e2c7e5d7b4a905a892d410 (patch) | |
tree | 15f94b12befe504f1db95ffb4e329f8791456f1c | |
parent | ee3811dee81f72facccd080c1b8dad3721a1b398 (diff) | |
download | serenity-bc64f8c5020f1ff332e2c7e5d7b4a905a892d410.zip |
LibGUI: Make AbstractView::set_model() take a RefPtr<Model>
Let's face it: Taking RefPtr<T>&& arguments is obnoxious and puts too
much unnecessary burden on the caller.
-rw-r--r-- | Libraries/LibGUI/AbstractView.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibGUI/AbstractView.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGUI/AbstractView.cpp b/Libraries/LibGUI/AbstractView.cpp index e9ac3dbc69..56e86ae1e4 100644 --- a/Libraries/LibGUI/AbstractView.cpp +++ b/Libraries/LibGUI/AbstractView.cpp @@ -46,7 +46,7 @@ AbstractView::~AbstractView() { } -void AbstractView::set_model(RefPtr<Model>&& model) +void AbstractView::set_model(RefPtr<Model> model) { if (model == m_model) return; diff --git a/Libraries/LibGUI/AbstractView.h b/Libraries/LibGUI/AbstractView.h index e8e339f86f..151725e6a0 100644 --- a/Libraries/LibGUI/AbstractView.h +++ b/Libraries/LibGUI/AbstractView.h @@ -37,7 +37,7 @@ class AbstractView : public ScrollableWidget { friend class Model; public: - void set_model(RefPtr<Model>&&); + void set_model(RefPtr<Model>); Model* model() { return m_model.ptr(); } const Model* model() const { return m_model.ptr(); } |