From 65254486efff0fd1bb78a48ff90b7713a5ce539f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 29 Jan 2024 18:17:47 +0100 Subject: Kernel: Update TODO. Src: Refactorings according to clang-format. Meta: Update specification. Public: Remove useless UIKit. Signed-off-by: Amlal El Mahrouss --- Private/HALKit/AMD64/PCI/Iterator.cpp | 40 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'Private/HALKit/AMD64/PCI/Iterator.cpp') diff --git a/Private/HALKit/AMD64/PCI/Iterator.cpp b/Private/HALKit/AMD64/PCI/Iterator.cpp index 6f80d496..3d357901 100644 --- a/Private/HALKit/AMD64/PCI/Iterator.cpp +++ b/Private/HALKit/AMD64/PCI/Iterator.cpp @@ -9,31 +9,29 @@ #include -#define PCI_ITERATOR_FIND_AND_UNWRAP(DEV, SZ) \ - if (DEV.Leak()) \ - return DEV.Leak(); +#define PCI_ITERATOR_FIND_AND_UNWRAP(DEV, SZ) \ + if (DEV.Leak()) return DEV.Leak(); namespace hCore::PCI { - Iterator::Iterator(const Types::PciDeviceKind &type) { - // probe devices. - for (int bus = 0; bus < ME_BUS_COUNT; ++bus) { - for (int device = 0; device < ME_DEVICE_COUNT; ++device) { - for (int function = 0; function < ME_FUNCTION_COUNT; ++function) { - Device dev(bus, device, function, 0); +Iterator::Iterator(const Types::PciDeviceKind &type) { + // probe devices. + for (int bus = 0; bus < ME_BUS_COUNT; ++bus) { + for (int device = 0; device < ME_DEVICE_COUNT; ++device) { + for (int function = 0; function < ME_FUNCTION_COUNT; ++function) { + Device dev(bus, device, function, 0); - if (dev.Class() == (UChar) type) { - m_Devices[bus].Leak().Leak() = dev; - } - } - } + if (dev.Class() == (UChar)type) { + m_Devices[bus].Leak().Leak() = dev; } + } } + } +} - Iterator::~Iterator() { - } +Iterator::~Iterator() {} - Ref Iterator::operator[](const Size &sz) { - PCI_ITERATOR_FIND_AND_UNWRAP(m_Devices[sz], sz); - return {}; - } -} // namespace hCore::PCI +Ref Iterator::operator[](const Size &sz) { + PCI_ITERATOR_FIND_AND_UNWRAP(m_Devices[sz], sz); + return {}; +} +} // namespace hCore::PCI -- cgit v1.2.3