mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
LibGUI: Add operators >,>= to TextPosition
This commit is contained in:
parent
1d522e4b4c
commit
b75ed992a6
1 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,8 @@ public:
|
|||
bool operator==(const TextPosition& other) const { return m_line == other.m_line && m_column == other.m_column; }
|
||||
bool operator!=(const TextPosition& other) const { return m_line != other.m_line || m_column != other.m_column; }
|
||||
bool operator<(const TextPosition& other) const { return m_line < other.m_line || (m_line == other.m_line && m_column < other.m_column); }
|
||||
bool operator>(const TextPosition& other) const { return *this != other && !(*this < other); }
|
||||
bool operator>=(const TextPosition& other) const { return *this > other || (*this == other); }
|
||||
|
||||
private:
|
||||
size_t m_line { 0xffffffff };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue