Kernel: Add some comparison operators to PhysicalAddress

This commit is contained in:
Conrad Pankoff 2019-06-11 21:12:17 +10:00 committed by Andreas Kling
commit 1a77dfed23
Notes: sideshowbarker 2024-07-19 13:38:42 +09:00

View file

@ -21,6 +21,11 @@ public:
dword page_base() const { return m_address & 0xfffff000; }
bool operator==(const PhysicalAddress& other) const { return m_address == other.m_address; }
bool operator!=(const PhysicalAddress& other) const { return m_address != other.m_address; }
bool operator>(const PhysicalAddress& other) const { return m_address > other.m_address; }
bool operator>=(const PhysicalAddress& other) const { return m_address >= other.m_address; }
bool operator<(const PhysicalAddress& other) const { return m_address < other.m_address; }
bool operator<=(const PhysicalAddress& other) const { return m_address <= other.m_address; }
private:
dword m_address { 0 };