Kernel: Declare copy-ability of IOAddressGroup

This commit is contained in:
Ben Wiederhake 2021-10-10 15:37:27 +02:00 committed by Linus Groh
parent 79707d83d3
commit fd8300e52d
Notes: sideshowbarker 2024-07-18 02:51:13 +09:00

View file

@ -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<IOAddress> 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;