diff -r 202e74157de5 -r eb4c25284a19 sources/geometry.h --- a/sources/geometry.h Tue Dec 16 23:50:56 2014 +0200 +++ b/sources/geometry.h Mon May 04 15:51:03 2015 +0300 @@ -43,12 +43,41 @@ x (0), y (0) {} - inline METHOD operator< (const Position& other) const -> bool; - inline METHOD operator> (const Position& other) const -> bool; - inline METHOD operator== (const Position& other) const -> bool; - inline METHOD operator<= (const Position& other) const -> bool; - inline METHOD operator>= (const Position& other) const -> bool; - inline METHOD operator!= (const Position& other) const -> bool; + bool operator< (const Position& other) const + { + if (y != other.y) + return y < other.y; + + return x < other.x; + } + + bool operator> (const Position& other) const + { + if (y != other.y) + return y > other.y; + + return x > other.x; + } + + bool operator== (const Position& other) const + { + return y == other.y and x == other.x; + } + + bool operator!= (const Position& other) const + { + return not operator== (other); + } + + bool operator<= (const Position& other) const + { + return not operator> (other); + } + + bool operator>= (const Position& other) const + { + return not operator< (other); + } }; // ------------------------------------------------------------------------------------------------- @@ -84,57 +113,3 @@ Position(), Size() {} }; - -// ------------------------------------------------------------------------------------------------- - -inline METHOD -Position::operator< (const Position& other) const -> bool -{ - if (y != other.y) - return y < other.y; - - return x < other.x; -} - -// ------------------------------------------------------------------------------------------------- - -inline METHOD -Position::operator> (const Position& other) const -> bool -{ - if (y != other.y) - return y > other.y; - - return x > other.x; -} - -// ------------------------------------------------------------------------------------------------- - -inline METHOD -Position::operator== (const Position& other) const -> bool -{ - return y == other.y and x == other.x; -} - -// ------------------------------------------------------------------------------------------------- - -inline METHOD -Position::operator<= (const Position& other) const -> bool -{ - return not operator> (other); -} - -// ------------------------------------------------------------------------------------------------- - -inline METHOD -Position::operator>= (const Position& other) const -> bool -{ - return not operator< (other); -} - -// ------------------------------------------------------------------------------------------------- - -inline METHOD -Position::operator!= (const Position& other) const -> bool -{ - return not operator== (other); -}