mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-25 12:38:37 +00:00
Kernel: Stop using the make<T> factory method in the Kernel
As make<T> is infallible, it really should not be used anywhere in the Kernel. Instead replace with fallible `new (nothrow)` calls, that will eventually be error-propagated.
This commit is contained in:
committed by
Andreas Kling
parent
e5e7cb822a
commit
8289727fac
@@ -48,7 +48,7 @@ void PhysicalRegion::initialize_zones()
|
||||
size_t zone_count = 0;
|
||||
auto first_address = base_address;
|
||||
while (remaining_pages >= pages_per_zone) {
|
||||
m_zones.append(make<PhysicalZone>(base_address, pages_per_zone));
|
||||
m_zones.append(adopt_nonnull_own_or_enomem(new (nothrow) PhysicalZone(base_address, pages_per_zone)).release_value_but_fixme_should_propagate_errors());
|
||||
base_address = base_address.offset(pages_per_zone * PAGE_SIZE);
|
||||
m_usable_zones.append(m_zones.last());
|
||||
remaining_pages -= pages_per_zone;
|
||||
|
||||
Reference in New Issue
Block a user