diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-03-16 13:15:15 -0600 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-03-17 00:51:36 -0700 |
commit | 190cf1507b88d25d04148d983d72a378035b05e9 (patch) | |
tree | a0aa522b2a47f022b3b791b14e3b6902f3df29d6 /Kernel/Storage/ATA | |
parent | 68f75ab98e4d8a7e48de48c2497a8395b79a4ba5 (diff) | |
download | serenity-190cf1507b88d25d04148d983d72a378035b05e9.zip |
Kernel: Use default constructors/destructors
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
Diffstat (limited to 'Kernel/Storage/ATA')
-rw-r--r-- | Kernel/Storage/ATA/AHCIController.cpp | 4 | ||||
-rw-r--r-- | Kernel/Storage/ATA/AHCIPortHandler.cpp | 4 | ||||
-rw-r--r-- | Kernel/Storage/ATA/ATADevice.cpp | 4 | ||||
-rw-r--r-- | Kernel/Storage/ATA/ATADiskDevice.cpp | 4 | ||||
-rw-r--r-- | Kernel/Storage/ATA/ATAPIDiscDevice.cpp | 4 | ||||
-rw-r--r-- | Kernel/Storage/ATA/IDEChannel.cpp | 4 | ||||
-rw-r--r-- | Kernel/Storage/ATA/IDEController.cpp | 4 |
7 files changed, 7 insertions, 21 deletions
diff --git a/Kernel/Storage/ATA/AHCIController.cpp b/Kernel/Storage/ATA/AHCIController.cpp index 940f89a200..b505f40f5b 100644 --- a/Kernel/Storage/ATA/AHCIController.cpp +++ b/Kernel/Storage/ATA/AHCIController.cpp @@ -135,9 +135,7 @@ NonnullOwnPtr<Memory::Region> AHCIController::default_hba_region() const return MM.allocate_kernel_region(PhysicalAddress(PCI::get_BAR5(pci_address())).page_base(), Memory::page_round_up(sizeof(AHCI::HBA)).release_value_but_fixme_should_propagate_errors(), "AHCI HBA", Memory::Region::Access::ReadWrite).release_value(); } -AHCIController::~AHCIController() -{ -} +AHCIController::~AHCIController() = default; void AHCIController::initialize_hba(PCI::DeviceIdentifier const& pci_device_identifier) { diff --git a/Kernel/Storage/ATA/AHCIPortHandler.cpp b/Kernel/Storage/ATA/AHCIPortHandler.cpp index 0d6d81c3d7..b009547767 100644 --- a/Kernel/Storage/ATA/AHCIPortHandler.cpp +++ b/Kernel/Storage/ATA/AHCIPortHandler.cpp @@ -78,9 +78,7 @@ AHCI::HBADefinedCapabilities AHCIPortHandler::hba_capabilities() const return m_parent_controller->hba_capabilities(); } -AHCIPortHandler::~AHCIPortHandler() -{ -} +AHCIPortHandler::~AHCIPortHandler() = default; bool AHCIPortHandler::handle_irq(const RegisterState&) { diff --git a/Kernel/Storage/ATA/ATADevice.cpp b/Kernel/Storage/ATA/ATADevice.cpp index c40f5b4eec..d4591affe1 100644 --- a/Kernel/Storage/ATA/ATADevice.cpp +++ b/Kernel/Storage/ATA/ATADevice.cpp @@ -21,9 +21,7 @@ ATADevice::ATADevice(const ATAController& controller, ATADevice::Address ata_add { } -ATADevice::~ATADevice() -{ -} +ATADevice::~ATADevice() = default; void ATADevice::start_request(AsyncBlockDeviceRequest& request) { diff --git a/Kernel/Storage/ATA/ATADiskDevice.cpp b/Kernel/Storage/ATA/ATADiskDevice.cpp index dd2f484661..4d2687725f 100644 --- a/Kernel/Storage/ATA/ATADiskDevice.cpp +++ b/Kernel/Storage/ATA/ATADiskDevice.cpp @@ -31,9 +31,7 @@ ATADiskDevice::ATADiskDevice(const ATAController& controller, ATADevice::Address { } -ATADiskDevice::~ATADiskDevice() -{ -} +ATADiskDevice::~ATADiskDevice() = default; StringView ATADiskDevice::class_name() const { diff --git a/Kernel/Storage/ATA/ATAPIDiscDevice.cpp b/Kernel/Storage/ATA/ATAPIDiscDevice.cpp index a9f7a91447..f7ea93f4b6 100644 --- a/Kernel/Storage/ATA/ATAPIDiscDevice.cpp +++ b/Kernel/Storage/ATA/ATAPIDiscDevice.cpp @@ -31,9 +31,7 @@ ATAPIDiscDevice::ATAPIDiscDevice(const ATAController& controller, ATADevice::Add { } -ATAPIDiscDevice::~ATAPIDiscDevice() -{ -} +ATAPIDiscDevice::~ATAPIDiscDevice() = default; StringView ATAPIDiscDevice::class_name() const { diff --git a/Kernel/Storage/ATA/IDEChannel.cpp b/Kernel/Storage/ATA/IDEChannel.cpp index fb4acf492f..f3ffdae92c 100644 --- a/Kernel/Storage/ATA/IDEChannel.cpp +++ b/Kernel/Storage/ATA/IDEChannel.cpp @@ -100,9 +100,7 @@ void IDEChannel::clear_pending_interrupts() const m_io_group.io_base().offset(ATA_REG_STATUS).in<u8>(); } -UNMAP_AFTER_INIT IDEChannel::~IDEChannel() -{ -} +UNMAP_AFTER_INIT IDEChannel::~IDEChannel() = default; void IDEChannel::start_request(AsyncBlockDeviceRequest& request, bool is_slave, u16 capabilities) { diff --git a/Kernel/Storage/ATA/IDEController.cpp b/Kernel/Storage/ATA/IDEController.cpp index 78fcb5fad8..52b71c4462 100644 --- a/Kernel/Storage/ATA/IDEController.cpp +++ b/Kernel/Storage/ATA/IDEController.cpp @@ -65,9 +65,7 @@ UNMAP_AFTER_INIT IDEController::IDEController() { } -UNMAP_AFTER_INIT IDEController::~IDEController() -{ -} +UNMAP_AFTER_INIT IDEController::~IDEController() = default; RefPtr<StorageDevice> IDEController::device_by_channel_and_position(u32 index) const { |