diff --git a/src/nostalgia/common/point.hpp b/src/nostalgia/common/point.hpp index 7d7deece..bed49d15 100644 --- a/src/nostalgia/common/point.hpp +++ b/src/nostalgia/common/point.hpp @@ -57,7 +57,9 @@ class Point { constexpr Point operator/=(int i); - constexpr bool operator==(const Point&); + constexpr bool operator==(const Point&) const; + + constexpr bool operator!=(const Point&) const; }; @@ -169,11 +171,16 @@ constexpr Point Point::operator/=(int i) { return *this; } -constexpr bool Point::operator==(const Point &p) { +constexpr bool Point::operator==(const Point &p) const { return x == p.x && y == p.y; } +constexpr bool Point::operator!=(const Point &p) const { + return x != p.x || y != p.y; +} + + template ox::Error model(T *io, Point *obj) { auto err = OxError(0);