[nostalgia/common] Add != operator to Point
This commit is contained in:
parent
fdda3bd82d
commit
47171f593c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user