diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-30 21:17:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-30 21:17:16 +0300 |
commit | aaa274245a584c633dcfdb5444bbc1dc21c0c28f (patch) | |
tree | b0f83a484375fe001eee281d23d2457e705f8256 | |
parent | 11eede5b6822baa327a0f4d58b71b72c9f9bbab9 (diff) | |
download | manaplus-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.gz manaplus-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.bz2 manaplus-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.xz manaplus-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.zip |
Add copy constructor into Rect.
-rw-r--r-- | src/gui/rect.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/rect.h b/src/gui/rect.h index 34f333cfc..240d4ce44 100644 --- a/src/gui/rect.h +++ b/src/gui/rect.h @@ -91,6 +91,23 @@ class Rect notfinal */ Rect(const int x, const int y, const int width, const int height); + Rect(const Rect &r) : + x(r.x), + y(r.y), + width(r.width), + height(r.height) + { + } + + Rect &operator=(const Rect &r) + { + x = r.x; + y = r.y; + width = r.width; + height = r.height; + return *this; + } + virtual ~Rect() { } |