mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +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
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