summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-30 21:17:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-30 21:17:16 +0300
commitaaa274245a584c633dcfdb5444bbc1dc21c0c28f (patch)
treeb0f83a484375fe001eee281d23d2457e705f8256
parent11eede5b6822baa327a0f4d58b71b72c9f9bbab9 (diff)
downloadmv-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.gz
mv-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.bz2
mv-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.tar.xz
mv-aaa274245a584c633dcfdb5444bbc1dc21c0c28f.zip
Add copy constructor into Rect.
-rw-r--r--src/gui/rect.h17
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()
{ }