summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2019-08-04 18:58:54 +0200
committerDavid Tardon <dtardon@redhat.com>2019-08-04 18:58:54 +0200
commit0a62d06de2462b6be9f086b5997a99eb2feb7246 (patch)
treef964ce518f7c775e7f4248e77ab8894c58a02954
parent829afb86ef093446cfb624cc492902eb36013bd1 (diff)
make trivial copy ctors default too
Change-Id: I9d1359ea3867add91eb9c86eea6b25c6c98abc44
-rw-r--r--src/lib/VSDParser.h3
-rw-r--r--src/lib/VSDStencils.cpp6
-rw-r--r--src/lib/VSDStencils.h2
-rw-r--r--src/lib/VSDStyles.cpp7
-rw-r--r--src/lib/VSDStyles.h70
-rw-r--r--src/lib/VSDTypes.h23
6 files changed, 18 insertions, 93 deletions
diff --git a/src/lib/VSDParser.h b/src/lib/VSDParser.h
index d368c36..07c04e3 100644
--- a/src/lib/VSDParser.h
+++ b/src/lib/VSDParser.h
@@ -35,8 +35,7 @@ struct Pointer
{
Pointer()
: Type(0), Offset(0), Length(0), Format(0), ListSize(0) {}
- Pointer(const Pointer &ptr)
- : Type(ptr.Type), Offset(ptr.Offset), Length(ptr.Length), Format(ptr.Format), ListSize(ptr.ListSize) {}
+ Pointer(const Pointer &ptr) = default;
Pointer &operator=(const Pointer &ptr) = default;
unsigned Type;
unsigned Offset;
diff --git a/src/lib/VSDStencils.cpp b/src/lib/VSDStencils.cpp
index 7c1d4dc..73af5ed 100644
--- a/src/lib/VSDStencils.cpp
+++ b/src/lib/VSDStencils.cpp
@@ -117,12 +117,6 @@ libvisio::VSDStencil::VSDStencil()
{
}
-libvisio::VSDStencil::VSDStencil(const libvisio::VSDStencil &stencil)
- : m_shapes(stencil.m_shapes), m_shadowOffsetX(stencil.m_shadowOffsetX),
- m_shadowOffsetY(stencil.m_shadowOffsetY), m_firstShapeId(stencil.m_firstShapeId)
-{
-}
-
libvisio::VSDStencil::~VSDStencil()
{
}
diff --git a/src/lib/VSDStencils.h b/src/lib/VSDStencils.h
index 6552595..964a933 100644
--- a/src/lib/VSDStencils.h
+++ b/src/lib/VSDStencils.h
@@ -63,7 +63,7 @@ class VSDStencil
{
public:
VSDStencil();
- VSDStencil(const VSDStencil &stencil);
+ VSDStencil(const VSDStencil &stencil) = default;
~VSDStencil();
VSDStencil &operator=(const VSDStencil &stencil) = default;
void addStencilShape(unsigned id, const VSDShape &shape);
diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index 97913b5..59e2802 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -61,13 +61,6 @@ libvisio::VSDStyles::VSDStyles() :
{
}
-libvisio::VSDStyles::VSDStyles(const libvisio::VSDStyles &styles) :
- m_lineStyles(styles.m_lineStyles), m_fillStyles(styles.m_fillStyles), m_textBlockStyles(styles.m_textBlockStyles),
- m_charStyles(styles.m_charStyles), m_paraStyles(styles.m_paraStyles), m_lineStyleMasters(styles.m_lineStyleMasters),
- m_fillStyleMasters(styles.m_fillStyleMasters), m_textStyleMasters(styles.m_textStyleMasters)
-{
-}
-
libvisio::VSDStyles::~VSDStyles()
{
}
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 6a68598..542b952 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -32,10 +32,7 @@ struct VSDOptionalLineStyle
const boost::optional<long> &qlm) :
width(w), colour(col), pattern(p), startMarker(sm), endMarker(em), cap(c), rounding(r),
qsLineColour(qlc), qsLineMatrix(qlm) {}
- VSDOptionalLineStyle(const VSDOptionalLineStyle &style) :
- width(style.width), colour(style.colour), pattern(style.pattern), startMarker(style.startMarker),
- endMarker(style.endMarker), cap(style.cap), rounding(style.rounding), qsLineColour(style.qsLineColour),
- qsLineMatrix(style.qsLineMatrix) {}
+ VSDOptionalLineStyle(const VSDOptionalLineStyle &style) = default;
~VSDOptionalLineStyle() {}
VSDOptionalLineStyle &operator=(const VSDOptionalLineStyle &style) = default;
void override(const VSDOptionalLineStyle &style)
@@ -71,11 +68,7 @@ struct VSDLineStyle
unsigned char em, unsigned char c, double r, long qlc, long qlm) :
width(w), colour(col), pattern(p), startMarker(sm), endMarker(em), cap(c),
rounding(r), qsLineColour(qlc), qsLineMatrix(qlm) {}
- VSDLineStyle(const VSDLineStyle &style) :
- width(style.width), colour(style.colour), pattern(style.pattern),
- startMarker(style.startMarker), endMarker(style.endMarker), cap(style.cap),
- rounding(style.rounding), qsLineColour(style.qsLineColour),
- qsLineMatrix(style.qsLineMatrix) {}
+ VSDLineStyle(const VSDLineStyle &style) = default;
~VSDLineStyle() {}
VSDLineStyle &operator=(const VSDLineStyle &style) = default;
void override(const VSDOptionalLineStyle &style, const VSDXTheme *theme)
@@ -122,13 +115,7 @@ struct VSDOptionalFillStyle
fgColour(fgc), bgColour(bgc), pattern(p), fgTransparency(fga), bgTransparency(bga),
shadowFgColour(sfgc), shadowPattern(shp), shadowOffsetX(shX), shadowOffsetY(shY),
qsFillColour(qsFc), qsShadowColour(qsSc), qsFillMatrix(qsFm) {}
- VSDOptionalFillStyle(const VSDOptionalFillStyle &style) :
- fgColour(style.fgColour), bgColour(style.bgColour), pattern(style.pattern),
- fgTransparency(style.fgTransparency), bgTransparency(style.bgTransparency),
- shadowFgColour(style.shadowFgColour), shadowPattern(style.shadowPattern),
- shadowOffsetX(style.shadowOffsetX), shadowOffsetY(style.shadowOffsetY),
- qsFillColour(style.qsFillColour), qsShadowColour(style.qsShadowColour),
- qsFillMatrix(style.qsFillMatrix) {}
+ VSDOptionalFillStyle(const VSDOptionalFillStyle &style) = default;
~VSDOptionalFillStyle() {}
VSDOptionalFillStyle &operator=(const VSDOptionalFillStyle &style) = default;
void override(const VSDOptionalFillStyle &style)
@@ -173,13 +160,7 @@ struct VSDFillStyle
: fgColour(fgc), bgColour(bgc), pattern(p), fgTransparency(fga), bgTransparency(bga),
shadowFgColour(sfgc), shadowPattern(shp), shadowOffsetX(shX), shadowOffsetY(shY),
qsFillColour(qsFc), qsShadowColour(qsSc), qsFillMatrix(qsFm) {}
- VSDFillStyle(const VSDFillStyle &style) :
- fgColour(style.fgColour), bgColour(style.bgColour), pattern(style.pattern),
- fgTransparency(style.fgTransparency), bgTransparency(style.bgTransparency),
- shadowFgColour(style.shadowFgColour), shadowPattern(style.shadowPattern),
- shadowOffsetX(style.shadowOffsetX), shadowOffsetY(style.shadowOffsetY),
- qsFillColour(style.qsFillColour), qsShadowColour(style.qsShadowColour),
- qsFillMatrix(style.qsFillMatrix) {}
+ VSDFillStyle(const VSDFillStyle &style) = default;
~VSDFillStyle() {}
VSDFillStyle &operator=(const VSDFillStyle &style) = default;
void override(const VSDOptionalFillStyle &style, const VSDXTheme *theme)
@@ -243,13 +224,7 @@ struct VSDOptionalCharStyle
underline(u), doubleunderline(du), strikeout(so), doublestrikeout(dso),
allcaps(ac), initcaps(ic), smallcaps(sc), superscript(super),
subscript(sub), scaleWidth(sw) {}
- VSDOptionalCharStyle(const VSDOptionalCharStyle &style) :
- charCount(style.charCount), font(style.font), colour(style.colour),
- size(style.size), bold(style.bold), italic(style.italic),
- underline(style.underline), doubleunderline(style.doubleunderline),
- strikeout(style.strikeout), doublestrikeout(style.doublestrikeout),
- allcaps(style.allcaps), initcaps(style.initcaps), smallcaps(style.smallcaps),
- superscript(style.superscript), subscript(style.subscript), scaleWidth(style.scaleWidth) {}
+ VSDOptionalCharStyle(const VSDOptionalCharStyle &style) = default;
~VSDOptionalCharStyle() {}
VSDOptionalCharStyle &operator=(const VSDOptionalCharStyle &style) = default;
void override(const VSDOptionalCharStyle &style)
@@ -304,14 +279,7 @@ struct VSDCharStyle
underline(u), doubleunderline(du), strikeout(so), doublestrikeout(dso),
allcaps(ac), initcaps(ic), smallcaps(sc), superscript(super),
subscript(sub), scaleWidth(sw) {}
- VSDCharStyle(const VSDCharStyle &style) :
- charCount(style.charCount), font(style.font), colour(style.colour),
- size(style.size), bold(style.bold), italic(style.italic),
- underline(style.underline), doubleunderline(style.doubleunderline),
- strikeout(style.strikeout), doublestrikeout(style.doublestrikeout),
- allcaps(style.allcaps), initcaps(style.initcaps),
- smallcaps(style.smallcaps), superscript(style.superscript),
- subscript(style.subscript), scaleWidth(style.scaleWidth) {}
+ VSDCharStyle(const VSDCharStyle &style) = default;
~VSDCharStyle() {}
VSDCharStyle &operator=(const VSDCharStyle &style) = default;
void override(const VSDOptionalCharStyle &style, const VSDXTheme * /* theme */)
@@ -366,12 +334,7 @@ struct VSDOptionalParaStyle
charCount(cc), indFirst(ifst), indLeft(il), indRight(ir), spLine(sl), spBefore(sb), spAfter(sa),
align(a), bullet(b), bulletStr(bs), bulletFont(bf), bulletFontSize(bfs),
textPosAfterBullet(tpab), flags(f) {}
- VSDOptionalParaStyle(const VSDOptionalParaStyle &style) :
- charCount(style.charCount), indFirst(style.indFirst), indLeft(style.indLeft),
- indRight(style.indRight), spLine(style.spLine), spBefore(style.spBefore), spAfter(style.spAfter),
- align(style.align), bullet(style.bullet), bulletStr(style.bulletStr), bulletFont(style.bulletFont),
- bulletFontSize(style.bulletFontSize), textPosAfterBullet(style.textPosAfterBullet),
- flags(style.flags) {}
+ VSDOptionalParaStyle(const VSDOptionalParaStyle &style) = default;
~VSDOptionalParaStyle() {}
VSDOptionalParaStyle &operator=(const VSDOptionalParaStyle &style) = default;
void override(const VSDOptionalParaStyle &style)
@@ -417,11 +380,7 @@ struct VSDParaStyle
const VSDName &bf, double bfs, double tpab, unsigned f) :
charCount(cc), indFirst(ifst), indLeft(il), indRight(ir), spLine(sl), spBefore(sb), spAfter(sa), align(a),
bullet(b), bulletStr(bs), bulletFont(bf), bulletFontSize(bfs), textPosAfterBullet(tpab), flags(f) {}
- VSDParaStyle(const VSDParaStyle &style) :
- charCount(style.charCount), indFirst(style.indFirst), indLeft(style.indLeft), indRight(style.indRight),
- spLine(style.spLine), spBefore(style.spBefore), spAfter(style.spAfter), align(style.align),
- bullet(style.bullet), bulletStr(style.bulletStr), bulletFont(style.bulletFont),
- bulletFontSize(style.bulletFontSize), textPosAfterBullet(style.textPosAfterBullet), flags(style.flags) {}
+ VSDParaStyle(const VSDParaStyle &style) = default;
~VSDParaStyle() {}
VSDParaStyle &operator=(const VSDParaStyle &style) = default;
void override(const VSDOptionalParaStyle &style, const VSDXTheme * /* theme */)
@@ -469,11 +428,7 @@ struct VSDOptionalTextBlockStyle
const boost::optional<unsigned char> &td) :
leftMargin(lm), rightMargin(rm), topMargin(tm), bottomMargin(bm), verticalAlign(va),
isTextBkgndFilled(isBgFilled), textBkgndColour(bgClr), defaultTabStop(defTab), textDirection(td) {}
- VSDOptionalTextBlockStyle(const VSDOptionalTextBlockStyle &style) :
- leftMargin(style.leftMargin), rightMargin(style.rightMargin), topMargin(style.topMargin),
- bottomMargin(style.bottomMargin), verticalAlign(style.verticalAlign),
- isTextBkgndFilled(style.isTextBkgndFilled), textBkgndColour(style.textBkgndColour),
- defaultTabStop(style.defaultTabStop), textDirection(style.textDirection) {}
+ VSDOptionalTextBlockStyle(const VSDOptionalTextBlockStyle &style) = default;
~VSDOptionalTextBlockStyle() {}
VSDOptionalTextBlockStyle &operator=(const VSDOptionalTextBlockStyle &style) = default;
void override(const VSDOptionalTextBlockStyle &style)
@@ -509,10 +464,7 @@ struct VSDTextBlockStyle
bool isBgFilled, Colour bgClr, double defTab, unsigned char td) :
leftMargin(lm), rightMargin(rm), topMargin(tm), bottomMargin(bm), verticalAlign(va),
isTextBkgndFilled(isBgFilled), textBkgndColour(bgClr), defaultTabStop(defTab), textDirection(td) {}
- VSDTextBlockStyle(const VSDTextBlockStyle &style) :
- leftMargin(style.leftMargin), rightMargin(style.rightMargin), topMargin(style.topMargin),
- bottomMargin(style.bottomMargin), verticalAlign(style.verticalAlign), isTextBkgndFilled(style.isTextBkgndFilled),
- textBkgndColour(style.textBkgndColour), defaultTabStop(style.defaultTabStop), textDirection(style.textDirection) {}
+ VSDTextBlockStyle(const VSDTextBlockStyle &style) = default;
~VSDTextBlockStyle() {}
VSDTextBlockStyle &operator=(const VSDTextBlockStyle &style) = default;
void override(const VSDOptionalTextBlockStyle &style, const VSDXTheme * /* theme */)
@@ -543,7 +495,7 @@ class VSDStyles
{
public:
VSDStyles();
- VSDStyles(const VSDStyles &styles);
+ VSDStyles(const VSDStyles &styles) = default;
~VSDStyles();
VSDStyles &operator=(const VSDStyles &styles) = default;
void addLineStyle(unsigned lineStyleIndex, const VSDOptionalLineStyle &lineStyle);
diff --git a/src/lib/VSDTypes.h b/src/lib/VSDTypes.h
index 6628edc..08ece99 100644
--- a/src/lib/VSDTypes.h
+++ b/src/lib/VSDTypes.h
@@ -35,9 +35,7 @@ struct XForm
XForm() : pinX(0.0), pinY(0.0), height(0.0), width(0.0),
pinLocX(0.0), pinLocY(0.0), angle(0.0),
flipX(false), flipY(false), x(0.0), y(0.0) {}
- XForm(const XForm &xform) : pinX(xform.pinX), pinY(xform.pinY), height(xform.height),
- width(xform.width), pinLocX(xform.pinLocX), pinLocY(xform.pinLocY), angle(xform.angle),
- flipX(xform.flipX), flipY(xform.flipY), x(xform.x), y(xform.y) {}
+ XForm(const XForm &xform) = default;
XForm &operator=(const XForm &xform) = default;
};
@@ -109,14 +107,7 @@ struct NURBSData
knots(),
weights(),
points() {}
- NURBSData(const NURBSData &data)
- : lastKnot(data.lastKnot),
- degree(data.degree),
- xType(data.xType),
- yType(data.yType),
- knots(data.knots),
- weights(data.weights),
- points(data.points) {}
+ NURBSData(const NURBSData &data) = default;
NURBSData &operator=(const NURBSData &data) = default;
};
@@ -183,7 +174,7 @@ public:
: m_data(data),
m_format(format) {}
VSDName() : m_data(), m_format(VSD_TEXT_ANSI) {}
- VSDName(const VSDName &name) : m_data(name.m_data), m_format(name.m_format) {}
+ VSDName(const VSDName &name) = default;
VSDName &operator=(const VSDName &name) = default;
bool empty() const
{
@@ -213,7 +204,7 @@ struct VSDMisc
{
bool m_hideText;
VSDMisc() : m_hideText(false) {}
- VSDMisc(const VSDMisc &misc) : m_hideText(misc.m_hideText) {}
+ VSDMisc(const VSDMisc &misc) = default;
VSDMisc &operator=(const VSDMisc &misc) = default;
};
@@ -248,11 +239,7 @@ struct VSDBullet
m_bulletFont(),
m_bulletFontSize(0.0),
m_textPosAfterBullet(0.0) {}
- VSDBullet(const VSDBullet &bullet) :
- m_bulletStr(bullet.m_bulletStr),
- m_bulletFont(bullet.m_bulletFont),
- m_bulletFontSize(bullet.m_bulletFontSize),
- m_textPosAfterBullet(bullet.m_textPosAfterBullet) {}
+ VSDBullet(const VSDBullet &bullet) = default;
VSDBullet &operator=(const VSDBullet &bullet) = default;
inline bool operator==(const VSDBullet &bullet) const
{