From bc64f8c5020f1ff332e2c7e5d7b4a905a892d410 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 24 Feb 2020 20:47:16 +0100 Subject: [PATCH] LibGUI: Make AbstractView::set_model() take a RefPtr Let's face it: Taking RefPtr&& arguments is obnoxious and puts too much unnecessary burden on the caller. --- Libraries/LibGUI/AbstractView.cpp | 2 +- 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) +void AbstractView::set_model(RefPtr 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&&); + void set_model(RefPtr); Model* model() { return m_model.ptr(); } const Model* model() const { return m_model.ptr(); }