mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +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:
parent
ee3811dee8
commit
bc64f8c502
2 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ AbstractView::~AbstractView()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractView::set_model(RefPtr<Model>&& model)
|
void AbstractView::set_model(RefPtr<Model> model)
|
||||||
{
|
{
|
||||||
if (model == m_model)
|
if (model == m_model)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -37,7 +37,7 @@ class AbstractView : public ScrollableWidget {
|
||||||
friend class Model;
|
friend class Model;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set_model(RefPtr<Model>&&);
|
void set_model(RefPtr<Model>);
|
||||||
Model* model() { return m_model.ptr(); }
|
Model* model() { return m_model.ptr(); }
|
||||||
const Model* model() const { return m_model.ptr(); }
|
const Model* model() const { return m_model.ptr(); }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue