1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

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.
This commit is contained in:
Andreas Kling 2020-02-24 20:47:16 +01:00
parent ee3811dee8
commit bc64f8c502
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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(); }