From fb790b07aeba8e22e4190cf3e1834d11ecde6c96 Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 25 Apr 2025 13:08:33 +0200 Subject: dev: better .clang-format, ran format command. Signed-off-by: Amlal --- dev/kernel/HALKit/AMD64/PCI/Iterator.cc | 49 ++++++++++++++------------------- 1 file changed, 20 insertions(+), 29 deletions(-) (limited to 'dev/kernel/HALKit/AMD64/PCI/Iterator.cc') diff --git a/dev/kernel/HALKit/AMD64/PCI/Iterator.cc b/dev/kernel/HALKit/AMD64/PCI/Iterator.cc index 09cfb2d2..2590aa94 100644 --- a/dev/kernel/HALKit/AMD64/PCI/Iterator.cc +++ b/dev/kernel/HALKit/AMD64/PCI/Iterator.cc @@ -1,39 +1,30 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ #include -namespace Kernel::PCI -{ - Iterator::Iterator(const Types::PciDeviceKind& type) - { - // probe devices. - for (int bus = 0; bus < NE_BUS_COUNT; ++bus) - { - for (int device = 0; device < NE_DEVICE_COUNT; ++device) - { - for (int function = 0; function < NE_FUNCTION_COUNT; ++function) - { - Device dev(bus, device, function, 0x00); +namespace Kernel::PCI { +Iterator::Iterator(const Types::PciDeviceKind& type) { + // probe devices. + for (int bus = 0; bus < NE_BUS_COUNT; ++bus) { + for (int device = 0; device < NE_DEVICE_COUNT; ++device) { + for (int function = 0; function < NE_FUNCTION_COUNT; ++function) { + Device dev(bus, device, function, 0x00); - if (dev.Class() == type) - { - fDevices[bus] = dev; - } - } - } - } - } + if (dev.Class() == type) { + fDevices[bus] = dev; + } + } + } + } +} - Iterator::~Iterator() - { - } +Iterator::~Iterator() {} - Ref Iterator::operator[](const Size& at) - { - return fDevices[at]; - } -} // namespace Kernel::PCI +Ref Iterator::operator[](const Size& at) { + return fDevices[at]; +} +} // namespace Kernel::PCI -- cgit v1.2.3