diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-30 21:16:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-30 21:16:51 +0300 |
commit | 11eede5b6822baa327a0f4d58b71b72c9f9bbab9 (patch) | |
tree | 9ebdfe4cbf574f8604b53818c656bb8909ca2928 | |
parent | c876d121eddbb283d9abc2185b6b925664a29699 (diff) | |
download | manaverse-11eede5b6822baa327a0f4d58b71b72c9f9bbab9.tar.gz manaverse-11eede5b6822baa327a0f4d58b71b72c9f9bbab9.tar.bz2 manaverse-11eede5b6822baa327a0f4d58b71b72c9f9bbab9.tar.xz manaverse-11eede5b6822baa327a0f4d58b71b72c9f9bbab9.zip |
Add copy constructor into LinePart.
-rw-r--r-- | src/gui/widgets/linepart.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/gui/widgets/linepart.h b/src/gui/widgets/linepart.h index 1efc37d94..0a934e378 100644 --- a/src/gui/widgets/linepart.h +++ b/src/gui/widgets/linepart.h @@ -60,9 +60,35 @@ class LinePart final { } + LinePart(const LinePart &l) : + mX(l.mX), + mY(l.mY), + mColor(l.mColor), + mColor2(l.mColor2), + mText(l.mText), + mType(l.mType), + mImage(l.mImage), + mBold(l.mBold) + { + } + + LinePart &operator=(const LinePart &l) + { + mX = l.mX; + mY = l.mY; + mColor = l.mColor; + mColor2 = l.mColor2; + mText = l.mText; + mType = l.mType; + mImage = l.mImage; + mBold = l.mBold; + return *this; + } + ~LinePart(); - int mX, mY; + int mX; + int mY; Color mColor; Color mColor2; std::string mText; |