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/Bus | |
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/Bus')
-rw-r--r-- | Kernel/Bus/USB/SysFSUSB.cpp | 4 | ||||
-rw-r--r-- | Kernel/Bus/USB/UHCI/UHCIController.cpp | 4 | ||||
-rw-r--r-- | Kernel/Bus/USB/USBDevice.cpp | 4 | ||||
-rw-r--r-- | Kernel/Bus/USB/USBTransfer.cpp | 4 | ||||
-rw-r--r-- | Kernel/Bus/VirtIO/Queue.cpp | 4 |
5 files changed, 5 insertions, 15 deletions
diff --git a/Kernel/Bus/USB/SysFSUSB.cpp b/Kernel/Bus/USB/SysFSUSB.cpp index 567910bdee..b9c62d6c98 100644 --- a/Kernel/Bus/USB/SysFSUSB.cpp +++ b/Kernel/Bus/USB/SysFSUSB.cpp @@ -20,9 +20,7 @@ SysFSUSBDeviceInformation::SysFSUSBDeviceInformation(NonnullOwnPtr<KString> devi { } -SysFSUSBDeviceInformation::~SysFSUSBDeviceInformation() -{ -} +SysFSUSBDeviceInformation::~SysFSUSBDeviceInformation() = default; ErrorOr<void> SysFSUSBDeviceInformation::try_generate(KBufferBuilder& builder) { diff --git a/Kernel/Bus/USB/UHCI/UHCIController.cpp b/Kernel/Bus/USB/UHCI/UHCIController.cpp index 403ac08888..f478cd6622 100644 --- a/Kernel/Bus/USB/UHCI/UHCIController.cpp +++ b/Kernel/Bus/USB/UHCI/UHCIController.cpp @@ -89,9 +89,7 @@ UNMAP_AFTER_INIT UHCIController::UHCIController(PCI::DeviceIdentifier const& pci { } -UNMAP_AFTER_INIT UHCIController::~UHCIController() -{ -} +UNMAP_AFTER_INIT UHCIController::~UHCIController() = default; ErrorOr<void> UHCIController::reset() { diff --git a/Kernel/Bus/USB/USBDevice.cpp b/Kernel/Bus/USB/USBDevice.cpp index 25b207545d..73257b20ea 100644 --- a/Kernel/Bus/USB/USBDevice.cpp +++ b/Kernel/Bus/USB/USBDevice.cpp @@ -51,9 +51,7 @@ Device::Device(Device const& device, NonnullOwnPtr<Pipe> default_pipe) { } -Device::~Device() -{ -} +Device::~Device() = default; ErrorOr<void> Device::enumerate_device() { diff --git a/Kernel/Bus/USB/USBTransfer.cpp b/Kernel/Bus/USB/USBTransfer.cpp index e2eb744a2b..c01b3904e7 100644 --- a/Kernel/Bus/USB/USBTransfer.cpp +++ b/Kernel/Bus/USB/USBTransfer.cpp @@ -24,9 +24,7 @@ Transfer::Transfer(Pipe& pipe, u16 len, NonnullOwnPtr<Memory::Region> data_buffe { } -Transfer::~Transfer() -{ -} +Transfer::~Transfer() = default; void Transfer::set_setup_packet(const USBRequestData& request) { diff --git a/Kernel/Bus/VirtIO/Queue.cpp b/Kernel/Bus/VirtIO/Queue.cpp index 0263708170..cb31571e4a 100644 --- a/Kernel/Bus/VirtIO/Queue.cpp +++ b/Kernel/Bus/VirtIO/Queue.cpp @@ -44,9 +44,7 @@ Queue::Queue(NonnullOwnPtr<Memory::Region> queue_region, u16 queue_size, u16 not enable_interrupts(); } -Queue::~Queue() -{ -} +Queue::~Queue() = default; void Queue::enable_interrupts() { |