From fd8300e52d1ff1fdb9c7778bffabc2581214b0ae Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sun, 10 Oct 2021 15:37:27 +0200 Subject: [PATCH] Kernel: Declare copy-ability of IOAddressGroup --- Kernel/Storage/IDEChannel.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Kernel/Storage/IDEChannel.h b/Kernel/Storage/IDEChannel.h index a5d295d7d0..0d8ac71d6b 100644 --- a/Kernel/Storage/IDEChannel.h +++ b/Kernel/Storage/IDEChannel.h @@ -59,13 +59,15 @@ public: { } - IOAddressGroup(const IOAddressGroup& other, IOAddress bus_master_base) + IOAddressGroup(IOAddressGroup const& other, IOAddress bus_master_base) : m_io_base(other.io_base()) , m_control_base(other.control_base()) , m_bus_master_base(bus_master_base) { } + IOAddressGroup(IOAddressGroup const&) = default; + // Disable default implementations that would use surprising integer promotion. bool operator==(const IOAddressGroup&) const = delete; bool operator<=(const IOAddressGroup&) const = delete; @@ -77,14 +79,6 @@ public: IOAddress control_base() const { return m_control_base; } Optional bus_master_base() const { return m_bus_master_base; } - const IOAddressGroup& operator=(const IOAddressGroup& group) - { - m_io_base = group.io_base(); - m_control_base = group.control_base(); - m_bus_master_base = group.bus_master_base(); - return *this; - } - private: IOAddress m_io_base; IOAddress m_control_base;