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:
Andreas Kling 2019-07-11 15:38:47 +02:00
commit 5254a320d8
Notes: sideshowbarker 2024-07-19 13:19:54 +09:00
14 changed files with 34 additions and 34 deletions

View file

@ -3,7 +3,7 @@
#define MBR_DEBUG
MBRPartitionTable::MBRPartitionTable(NonnullRefPtr<DiskDevice>&& device)
MBRPartitionTable::MBRPartitionTable(NonnullRefPtr<DiskDevice> device)
: m_device(move(device))
{
}
@ -65,5 +65,5 @@ RefPtr<DiskPartition> MBRPartitionTable::partition(unsigned index)
kprintf("MBRPartitionTable::partition: found partition index=%d type=%x\n", index, entry.type);
#endif
return DiskPartition::create(m_device.copy_ref(), entry.offset);
return DiskPartition::create(m_device, entry.offset);
}