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 /src/gui | |
parent | 11eede5b6822baa327a0f4d58b71b72c9f9bbab9 (diff) | |
download | mv-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.gz mv-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.bz2 mv-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.xz mv-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.zip |
Add copy constructor into Rect.
Diffstat (limited to 'src/gui')
-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() { } |