X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fpoint.hh;h=f438b34710a1f14a744c9ddc51757df079487ba1;hb=6a88803b8c42f44a6f09facc20fcb6fe7901a2f3;hp=093ad4cffe56f7b27d27f556cf34d51a7fa9a217;hpb=5dc5cc32b0c00c3bfba8ea5727599f49b56ae817;p=chaz%2Fopenbox diff --git a/otk/point.hh b/otk/point.hh index 093ad4cf..f438b347 100644 --- a/otk/point.hh +++ b/otk/point.hh @@ -2,26 +2,22 @@ #ifndef __point_hh #define __point_hh -/*! @file point.hh -*/ - namespace otk { class Point { -private: int _x, _y; - public: Point() : _x(0), _y(0) {} Point(int x, int y) : _x(x), _y(y) {} + Point(const Point &p) : _x(p._x), _y(p._y) {} - void setX(int x) { _x = x; } - void x() const { return _x; } + inline int x() const { return _x; } + inline int y() const { return _y; } - void setY(int x) { _x = x; } - void y() const { return _x; } + bool operator==(const Point &o) const { return _x == o._x && _y == o._y; } + bool operator!=(const Point &o) const { return _x != o._x || _y != o._y; } }; } -#endif /* __point_hh */ +#endif // __point_hh