From c8b95e42225e203f590a79e563b70d0355dbd7db Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 17 Feb 2012 21:39:19 +0100 Subject: utils: added assginment operator for point --- src/utils/point.cpp | 7 +++++++ src/utils/point.hpp | 1 + 2 files changed, 8 insertions(+) (limited to 'src/utils') diff --git a/src/utils/point.cpp b/src/utils/point.cpp index f4fd0184..c4306ea7 100644 --- a/src/utils/point.cpp +++ b/src/utils/point.cpp @@ -36,6 +36,13 @@ namespace usdx { } + Point& Point::operator=(const Point& point) + { + x = point.x; + y = point.y; + return *this; + } + float Point::get_x(void) const { return x; diff --git a/src/utils/point.hpp b/src/utils/point.hpp index f4d23c4f..7c1ec727 100644 --- a/src/utils/point.hpp +++ b/src/utils/point.hpp @@ -37,6 +37,7 @@ namespace usdx public: Point(float x, float y); Point(const Point& point); + Point& operator=(const Point& point); float get_x(void) const; float get_y(void) const; -- cgit v1.2.3