mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
Kernel: Avoid some un-necessary copies coming from range based for loops
- The irq_controller was getting add_ref/released needlessly during enumeration. - Used ranges were also getting needlessly copied.
This commit is contained in:
parent
a5f879ea8c
commit
7482cb6531
Notes:
sideshowbarker
2024-07-18 22:15:36 +09:00
Author: https://github.com/bgianfo
Commit: 7482cb6531
Pull-request: https://github.com/SerenityOS/serenity/pull/5359
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/bugaevc
2 changed files with 3 additions and 3 deletions
|
@ -117,7 +117,7 @@ RefPtr<IRQController> InterruptManagement::get_responsible_irq_controller(u8 int
|
|||
if (m_interrupt_controllers.size() == 1 && m_interrupt_controllers[0]->type() == IRQControllerType::i8259) {
|
||||
return m_interrupt_controllers[0];
|
||||
}
|
||||
for (auto irq_controller : m_interrupt_controllers) {
|
||||
for (auto& irq_controller : m_interrupt_controllers) {
|
||||
if (irq_controller->gsi_base() <= interrupt_vector)
|
||||
if (!irq_controller->is_hard_disabled())
|
||||
return irq_controller;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue