1
Fork 0
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:
Itamar 2022-03-29 16:02:54 +03:00 committed by Andreas Kling
parent 1d522e4b4c
commit b75ed992a6

View file

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