mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Kernel: Use MUST + Vector::try_append instead of Vector::append
In preparation for making Vector::append unavailable during compilation of the Kernel.
This commit is contained in:
parent
8bcce82887
commit
24066ba5ef
5 changed files with 8 additions and 8 deletions
|
@ -125,8 +125,8 @@ UNMAP_AFTER_INIT void StorageManagement::enumerate_disk_partitions() const
|
|||
continue;
|
||||
// FIXME: Try to not hardcode a maximum of 16 partitions per drive!
|
||||
auto disk_partition = DiskPartition::create(const_cast<StorageDevice&>(device), (partition_index + (16 * device_index)), partition_metadata.value());
|
||||
partitions.append(disk_partition);
|
||||
const_cast<StorageDevice&>(device).m_partitions.append(disk_partition);
|
||||
MUST(partitions.try_append(disk_partition));
|
||||
MUST(const_cast<StorageDevice&>(device).m_partitions.try_append(disk_partition));
|
||||
}
|
||||
device_index++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue