mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +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
Notes:
sideshowbarker
2024-07-19 01:59:31 +09:00
Author: https://github.com/awesomekling
Commit: b91c49364d
228 changed files with 461 additions and 461 deletions
|
@ -15,7 +15,7 @@ namespace Kernel {
|
|||
|
||||
NonnullRefPtr<DevPtsFS> DevPtsFS::create()
|
||||
{
|
||||
return adopt(*new DevPtsFS);
|
||||
return adopt_ref(*new DevPtsFS);
|
||||
}
|
||||
|
||||
DevPtsFS::DevPtsFS()
|
||||
|
@ -30,7 +30,7 @@ static AK::Singleton<HashTable<unsigned>> s_ptys;
|
|||
|
||||
bool DevPtsFS::initialize()
|
||||
{
|
||||
m_root_inode = adopt(*new DevPtsFSInode(*this, 1, nullptr));
|
||||
m_root_inode = adopt_ref(*new DevPtsFSInode(*this, 1, nullptr));
|
||||
m_root_inode->m_metadata.inode = { fsid(), 1 };
|
||||
m_root_inode->m_metadata.mode = 0040555;
|
||||
m_root_inode->m_metadata.uid = 0;
|
||||
|
@ -66,7 +66,7 @@ RefPtr<Inode> DevPtsFS::get_inode(InodeIdentifier inode_id) const
|
|||
auto* device = Device::get_device(201, pty_index);
|
||||
VERIFY(device);
|
||||
|
||||
auto inode = adopt(*new DevPtsFSInode(const_cast<DevPtsFS&>(*this), inode_id.index(), static_cast<SlavePTY*>(device)));
|
||||
auto inode = adopt_ref(*new DevPtsFSInode(const_cast<DevPtsFS&>(*this), inode_id.index(), static_cast<SlavePTY*>(device)));
|
||||
inode->m_metadata.inode = inode_id;
|
||||
inode->m_metadata.size = 0;
|
||||
inode->m_metadata.uid = device->uid();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue