mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
Everywhere: Turn #if *_DEBUG into dbgln_if/if constexpr
This commit is contained in:
parent
4e6f03a860
commit
6cf59b6ae9
58 changed files with 315 additions and 469 deletions
|
@ -134,10 +134,8 @@ MousePacket PS2MouseDevice::parse_data_packet(const RawPacket& raw_packet)
|
|||
}
|
||||
|
||||
packet.is_relative = true;
|
||||
#if PS2MOUSE_DEBUG
|
||||
dbgln("PS2 Relative Mouse: Buttons {:x}", packet.buttons);
|
||||
dbgln("Mouse: X {}, Y {}, Z {}", packet.x, packet.y, packet.z);
|
||||
#endif
|
||||
dbgln_if(PS2MOUSE_DEBUG, "PS2 Relative Mouse: Buttons {:x}", packet.buttons);
|
||||
dbgln_if(PS2MOUSE_DEBUG, "Mouse: X {}, Y {}, Z {}", packet.x, packet.y, packet.z);
|
||||
return packet;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,9 +176,8 @@ UNMAP_AFTER_INIT void UHCIController::create_structures()
|
|||
transfer_descriptor->set_isochronous();
|
||||
transfer_descriptor->link_queue_head(m_interrupt_transfer_queue->paddr());
|
||||
|
||||
#if UHCI_VERBOSE_DEBUG
|
||||
transfer_descriptor->print();
|
||||
#endif
|
||||
if constexpr (UHCI_VERBOSE_DEBUG)
|
||||
transfer_descriptor->print();
|
||||
}
|
||||
|
||||
m_free_td_pool.resize(MAXIMUM_NUMBER_OF_TDS);
|
||||
|
@ -192,10 +191,10 @@ UNMAP_AFTER_INIT void UHCIController::create_structures()
|
|||
// access the raw descriptor (that we later send to the controller)
|
||||
m_free_td_pool.at(i) = new (placement_addr) Kernel::USB::TransferDescriptor(paddr);
|
||||
|
||||
#if UHCI_VERBOSE_DEBUG
|
||||
auto transfer_descriptor = m_free_td_pool.at(i);
|
||||
transfer_descriptor->print();
|
||||
#endif
|
||||
if constexpr (UHCI_VERBOSE_DEBUG) {
|
||||
auto transfer_descriptor = m_free_td_pool.at(i);
|
||||
transfer_descriptor->print();
|
||||
}
|
||||
}
|
||||
|
||||
if constexpr (UHCI_DEBUG) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue