aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-02-17 21:39:19 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:51 +0100
commitc8b95e42225e203f590a79e563b70d0355dbd7db (patch)
treedae110eaf6979ab442d951c7a9ba765748898801 /src
parentae7ca5fd35b6425f8f1f73345f6748073e6f87ac (diff)
downloadusdx-c8b95e42225e203f590a79e563b70d0355dbd7db.tar.gz
usdx-c8b95e42225e203f590a79e563b70d0355dbd7db.tar.xz
usdx-c8b95e42225e203f590a79e563b70d0355dbd7db.zip
utils: added assginment operator for point
Diffstat (limited to 'src')
-rw-r--r--src/utils/point.cpp7
-rw-r--r--src/utils/point.hpp1
2 files changed, 8 insertions, 0 deletions
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;