diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-02-03 16:33:46 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-03 23:33:20 +0100 |
commit | 8289727fac65688ae8df8859743516f3dee2ed9a (patch) | |
tree | 0522663959d1e1f09f74fc83cfd990c4813d67a7 /Kernel/Interrupts/APIC.cpp | |
parent | e5e7cb822a7d1beec3af5781dac275e441782632 (diff) | |
download | serenity-8289727fac65688ae8df8859743516f3dee2ed9a.zip |
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.
Diffstat (limited to 'Kernel/Interrupts/APIC.cpp')
-rw-r--r-- | Kernel/Interrupts/APIC.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp index 5a46a6faac..0aa361d1f6 100644 --- a/Kernel/Interrupts/APIC.cpp +++ b/Kernel/Interrupts/APIC.cpp @@ -367,7 +367,7 @@ UNMAP_AFTER_INIT void APIC::setup_ap_boot_environment() // Allocate Processor structures for all APs and store the pointer to the data m_ap_processor_info.resize(aps_to_enable); for (size_t i = 0; i < aps_to_enable; i++) - m_ap_processor_info[i] = make<Processor>(); + m_ap_processor_info[i] = adopt_nonnull_own_or_enomem(new (nothrow) Processor()).release_value_but_fixme_should_propagate_errors(); auto* ap_processor_info_array = &ap_stack_array[aps_to_enable]; for (size_t i = 0; i < aps_to_enable; i++) { ap_processor_info_array[i] = FlatPtr(m_ap_processor_info[i].ptr()); |