From 11eede5b6822baa327a0f4d58b71b72c9f9bbab9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 Apr 2016 21:16:51 +0300 Subject: Add copy constructor into LinePart. --- src/gui/widgets/linepart.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-60-g2f50