1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

AK: Rename adopt() to adopt_ref()

This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
This commit is contained in:
Andreas Kling 2021-04-23 16:46:57 +02:00
parent b3db01e20e
commit b91c49364d
228 changed files with 461 additions and 461 deletions

View file

@ -14,7 +14,7 @@
NonnullRefPtr<DevicesModel> DevicesModel::create()
{
return adopt(*new DevicesModel);
return adopt_ref(*new DevicesModel);
}
DevicesModel::DevicesModel()

View file

@ -53,7 +53,7 @@ public:
static ProcessModel& the();
static NonnullRefPtr<ProcessModel> create() { return adopt(*new ProcessModel); }
static NonnullRefPtr<ProcessModel> create() { return adopt_ref(*new ProcessModel); }
virtual ~ProcessModel() override;
virtual int row_count(const GUI::ModelIndex&) const override;

View file

@ -88,7 +88,7 @@ ProcessStateWidget::ProcessStateWidget(pid_t pid)
m_table_view = add<GUI::TableView>();
m_table_view->column_header().set_visible(false);
m_table_view->column_header().set_section_size(0, 90);
m_table_view->set_model(adopt(*new ProcessStateModel(ProcessModel::the(), pid)));
m_table_view->set_model(adopt_ref(*new ProcessStateModel(ProcessModel::the(), pid)));
}
ProcessStateWidget::~ProcessStateWidget()