mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:37:45 +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:
parent
b3db01e20e
commit
b91c49364d
228 changed files with 461 additions and 461 deletions
|
@ -21,7 +21,7 @@ namespace Spreadsheet {
|
|||
|
||||
class HelpListModel final : public GUI::Model {
|
||||
public:
|
||||
static NonnullRefPtr<HelpListModel> create() { return adopt(*new HelpListModel); }
|
||||
static NonnullRefPtr<HelpListModel> create() { return adopt_ref(*new HelpListModel); }
|
||||
|
||||
virtual ~HelpListModel() override { }
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
if (s_the)
|
||||
return *s_the;
|
||||
|
||||
return *(s_the = adopt(*new HelpWindow(window)));
|
||||
return *(s_the = adopt_ref(*new HelpWindow(window)));
|
||||
}
|
||||
|
||||
virtual ~HelpWindow() override;
|
||||
|
|
|
@ -359,7 +359,7 @@ void Sheet::copy_cells(Vector<Position> from, Vector<Position> to, Optional<Posi
|
|||
|
||||
RefPtr<Sheet> Sheet::from_json(const JsonObject& object, Workbook& workbook)
|
||||
{
|
||||
auto sheet = adopt(*new Sheet(workbook));
|
||||
auto sheet = adopt_ref(*new Sheet(workbook));
|
||||
auto rows = object.get("rows").to_u32(default_row_count);
|
||||
auto columns = object.get("columns");
|
||||
auto name = object.get("name").as_string_or("Sheet");
|
||||
|
@ -617,7 +617,7 @@ RefPtr<Sheet> Sheet::from_xsv(const Reader::XSV& xsv, Workbook& workbook)
|
|||
auto cols = xsv.headers();
|
||||
auto rows = xsv.size();
|
||||
|
||||
auto sheet = adopt(*new Sheet(workbook));
|
||||
auto sheet = adopt_ref(*new Sheet(workbook));
|
||||
if (xsv.has_explicit_headers()) {
|
||||
sheet->m_columns = cols;
|
||||
} else {
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Spreadsheet {
|
|||
|
||||
class SheetModel final : public GUI::Model {
|
||||
public:
|
||||
static NonnullRefPtr<SheetModel> create(Sheet& sheet) { return adopt(*new SheetModel(sheet)); }
|
||||
static NonnullRefPtr<SheetModel> create(Sheet& sheet) { return adopt_ref(*new SheetModel(sheet)); }
|
||||
virtual ~SheetModel() override;
|
||||
|
||||
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return m_sheet->row_count(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue