mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:05:08 +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
|
@ -26,7 +26,7 @@ RefPtr<GUI::TextDocument> FileDB::get(const String& file_name)
|
|||
auto document = reinterpret_cast<const FileDB*>(this)->get(file_name);
|
||||
if (document.is_null())
|
||||
return nullptr;
|
||||
return adopt(*const_cast<GUI::TextDocument*>(document.leak_ref()));
|
||||
return adopt_ref(*const_cast<GUI::TextDocument*>(document.leak_ref()));
|
||||
}
|
||||
|
||||
RefPtr<const GUI::TextDocument> FileDB::get_or_create_from_filesystem(const String& file_name) const
|
||||
|
@ -43,7 +43,7 @@ RefPtr<GUI::TextDocument> FileDB::get_or_create_from_filesystem(const String& fi
|
|||
auto document = reinterpret_cast<const FileDB*>(this)->get_or_create_from_filesystem(file_name);
|
||||
if (document.is_null())
|
||||
return nullptr;
|
||||
return adopt(*const_cast<GUI::TextDocument*>(document.leak_ref()));
|
||||
return adopt_ref(*const_cast<GUI::TextDocument*>(document.leak_ref()));
|
||||
}
|
||||
|
||||
bool FileDB::is_open(const String& file_name) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue