[nostalgia/common] Add != operator to Point

This commit is contained in:
Gary Talent 2020-10-19 19:42:34 -05:00
parent fdda3bd82d
commit 47171f593c

View File

@ -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<typename T>
ox::Error model(T *io, Point *obj) {
auto err = OxError(0);