mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
Kernel: Remove use of copy_ref() in favor of regular RefPtr copies.
This is obviously more readable. If we ever run into a situation where ref count churn is actually causing trouble in the future, we can deal with it then. For now, let's keep it simple. :^)
This commit is contained in:
parent
560d037c41
commit
5254a320d8
Notes:
sideshowbarker
2024-07-19 13:19:54 +09:00
Author: https://github.com/awesomekling
Commit: 5254a320d8
14 changed files with 34 additions and 34 deletions
|
@ -31,7 +31,7 @@ static u8 to_ext2_file_type(mode_t mode)
|
|||
return EXT2_FT_UNKNOWN;
|
||||
}
|
||||
|
||||
NonnullRefPtr<Ext2FS> Ext2FS::create(NonnullRefPtr<DiskDevice>&& device)
|
||||
NonnullRefPtr<Ext2FS> Ext2FS::create(NonnullRefPtr<DiskDevice> device)
|
||||
{
|
||||
return adopt(*new Ext2FS(move(device)));
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ RefPtr<Inode> Ext2FS::get_inode(InodeIdentifier inode) const
|
|||
return (*it).value;
|
||||
auto new_inode = adopt(*new Ext2FSInode(const_cast<Ext2FS&>(*this), inode.index()));
|
||||
memcpy(&new_inode->m_raw_inode, reinterpret_cast<ext2_inode*>(block.offset_pointer(offset)), sizeof(ext2_inode));
|
||||
m_inode_cache.set(inode.index(), new_inode.copy_ref());
|
||||
m_inode_cache.set(inode.index(), new_inode);
|
||||
return new_inode;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue