1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:57:44 +00:00

Kernel: Prevent confusing silent misuse of PCI::Address

This commit is contained in:
Ben Wiederhake 2020-08-22 17:02:15 +02:00 committed by Andreas Kling
parent b4f26c2b31
commit 9a0cd9a50d

View file

@ -116,6 +116,13 @@ public:
bool is_null() const { return !m_bus && !m_slot && !m_function; }
operator bool() const { return !is_null(); }
// Disable default implementations that would use surprising integer promotion.
bool operator==(const Address&) const = delete;
bool operator<=(const Address&) const = delete;
bool operator>=(const Address&) const = delete;
bool operator<(const Address&) const = delete;
bool operator>(const Address&) const = delete;
u16 seg() const { return m_seg; }
u8 bus() const { return m_bus; }
u8 slot() const { return m_slot; }