diff options
-rw-r--r-- | tests/libsample/point.cpp | 6 | ||||
-rw-r--r-- | tests/libsample/point.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/libsample/point.cpp b/tests/libsample/point.cpp index 0b6540202..4c527b3a0 100644 --- a/tests/libsample/point.cpp +++ b/tests/libsample/point.cpp @@ -86,6 +86,12 @@ Point::operator+=(Point &other) return *this; } +bool +Point::operator!=(const Point &other) +{ + return (m_x != other.m_x) || (m_y != other.m_y); +} + Point& Point::operator-=(Point &other) { diff --git a/tests/libsample/point.h b/tests/libsample/point.h index a81750391..04eb4e195 100644 --- a/tests/libsample/point.h +++ b/tests/libsample/point.h @@ -74,6 +74,7 @@ public: Point& operator+=(Point &other); Point& operator-=(Point &other); + bool operator!=(const Point &other); void show(); |