Make Swap methods inline.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-04-22 13:32:06 +03:00
parent 1ec098968a
commit 279674f491
33 changed files with 34 additions and 34 deletions

View File

@ -61,7 +61,7 @@ public:
VAbstractArc &operator=(VAbstractArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; } VAbstractArc &operator=(VAbstractArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; }
#endif #endif
void Swap(VAbstractArc &arc) Q_DECL_NOTHROW inline void Swap(VAbstractArc &arc) Q_DECL_NOTHROW
{ VAbstractCurve::Swap(arc); std::swap(d, arc.d); } { VAbstractCurve::Swap(arc); std::swap(d, arc.d); }
QString GetFormulaF1 () const; QString GetFormulaF1 () const;

View File

@ -60,7 +60,7 @@ public:
VAbstractCurve &operator=(VAbstractCurve &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; } VAbstractCurve &operator=(VAbstractCurve &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; }
#endif #endif
void Swap(VAbstractCurve &curve) Q_DECL_NOTHROW inline void Swap(VAbstractCurve &curve) Q_DECL_NOTHROW
{ VGObject::Swap(curve); std::swap(d, curve.d); } { VGObject::Swap(curve); std::swap(d, curve.d); }
virtual QVector<QPointF> GetPoints() const =0; virtual QVector<QPointF> GetPoints() const =0;

View File

@ -69,7 +69,7 @@ public:
VArc &operator=(VArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; } VArc &operator=(VArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; }
#endif #endif
void Swap(VArc &arc) Q_DECL_NOTHROW inline void Swap(VArc &arc) Q_DECL_NOTHROW
{ VAbstractArc::Swap(arc); std::swap(d, arc.d); } { VAbstractArc::Swap(arc); std::swap(d, arc.d); }
QString GetFormulaRadius () const; QString GetFormulaRadius () const;

View File

@ -60,7 +60,7 @@ public:
VCubicBezier &operator=(VCubicBezier &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; } VCubicBezier &operator=(VCubicBezier &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; }
#endif #endif
void Swap(VCubicBezier &curve) Q_DECL_NOTHROW inline void Swap(VCubicBezier &curve) Q_DECL_NOTHROW
{ VAbstractCubicBezier::Swap(curve); std::swap(d, curve.d); } { VAbstractCubicBezier::Swap(curve); std::swap(d, curve.d); }
virtual VPointF GetP1() const Q_DECL_OVERRIDE; virtual VPointF GetP1() const Q_DECL_OVERRIDE;

View File

@ -61,7 +61,7 @@ public:
VCubicBezierPath &operator=(VCubicBezierPath &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; } VCubicBezierPath &operator=(VCubicBezierPath &&curve) Q_DECL_NOTHROW { Swap(curve); return *this; }
#endif #endif
void Swap(VCubicBezierPath &curve) Q_DECL_NOTHROW inline void Swap(VCubicBezierPath &curve) Q_DECL_NOTHROW
{ VAbstractCubicBezierPath::Swap(curve); std::swap(d, curve.d); } { VAbstractCubicBezierPath::Swap(curve); std::swap(d, curve.d); }
VPointF &operator[](int indx); VPointF &operator[](int indx);

View File

@ -72,7 +72,7 @@ public:
VEllipticalArc &operator=(VEllipticalArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; } VEllipticalArc &operator=(VEllipticalArc &&arc) Q_DECL_NOTHROW { Swap(arc); return *this; }
#endif #endif
void Swap(VEllipticalArc &arc) Q_DECL_NOTHROW inline void Swap(VEllipticalArc &arc) Q_DECL_NOTHROW
{ VAbstractArc::Swap(arc); std::swap(d, arc.d); } { VAbstractArc::Swap(arc); std::swap(d, arc.d); }
QString GetFormulaRotationAngle () const; QString GetFormulaRotationAngle () const;

View File

@ -61,7 +61,7 @@ public:
VGObject &operator=(VGObject &&obj) Q_DECL_NOTHROW { Swap(obj); return *this; } VGObject &operator=(VGObject &&obj) Q_DECL_NOTHROW { Swap(obj); return *this; }
#endif #endif
void Swap(VGObject &obj) Q_DECL_NOTHROW inline void Swap(VGObject &obj) Q_DECL_NOTHROW
{ std::swap(d, obj.d); } { std::swap(d, obj.d); }
quint32 getIdObject() const; quint32 getIdObject() const;

View File

@ -50,7 +50,7 @@ public:
VPlaceLabelItem &operator=(VPlaceLabelItem &&item) Q_DECL_NOTHROW { Swap(item); return *this; } VPlaceLabelItem &operator=(VPlaceLabelItem &&item) Q_DECL_NOTHROW { Swap(item); return *this; }
#endif #endif
void Swap(VPlaceLabelItem &item) Q_DECL_NOTHROW inline void Swap(VPlaceLabelItem &item) Q_DECL_NOTHROW
{ VPointF::Swap(item); std::swap(d, item.d); } { VPointF::Swap(item); std::swap(d, item.d); }
QString GetWidthFormula() const; QString GetWidthFormula() const;

View File

@ -65,7 +65,7 @@ public:
VPointF &operator=(VPointF &&point) Q_DECL_NOTHROW { Swap(point); return *this; } VPointF &operator=(VPointF &&point) Q_DECL_NOTHROW { Swap(point); return *this; }
#endif #endif
void Swap(VPointF &point) Q_DECL_NOTHROW inline void Swap(VPointF &point) Q_DECL_NOTHROW
{ VGObject::Swap(point); std::swap(d, point.d); } { VGObject::Swap(point); std::swap(d, point.d); }
explicit operator QPointF() const; explicit operator QPointF() const;

View File

@ -70,7 +70,7 @@ public:
VSpline &operator=(VSpline &&spline) Q_DECL_NOTHROW { Swap(spline); return *this; } VSpline &operator=(VSpline &&spline) Q_DECL_NOTHROW { Swap(spline); return *this; }
#endif #endif
void Swap(VSpline &spline) Q_DECL_NOTHROW inline void Swap(VSpline &spline) Q_DECL_NOTHROW
{ VAbstractCubicBezier::Swap(spline); std::swap(d, spline.d); } { VAbstractCubicBezier::Swap(spline); std::swap(d, spline.d); }
virtual VPointF GetP1 () const Q_DECL_OVERRIDE; virtual VPointF GetP1 () const Q_DECL_OVERRIDE;

View File

@ -70,7 +70,7 @@ public:
VSplinePath &operator=(VSplinePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; } VSplinePath &operator=(VSplinePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; }
#endif #endif
void Swap(VSplinePath &path) Q_DECL_NOTHROW inline void Swap(VSplinePath &path) Q_DECL_NOTHROW
{ VAbstractCubicBezierPath::Swap(path); std::swap(d, path.d); } { VAbstractCubicBezierPath::Swap(path); std::swap(d, path.d); }
void append(const VSplinePoint &point); void append(const VSplinePoint &point);

View File

@ -56,7 +56,7 @@ public:
VFSplinePoint &operator=(VFSplinePoint &&point) Q_DECL_NOTHROW { Swap(point); return *this; } VFSplinePoint &operator=(VFSplinePoint &&point) Q_DECL_NOTHROW { Swap(point); return *this; }
#endif #endif
void Swap(VFSplinePoint &point) Q_DECL_NOTHROW inline void Swap(VFSplinePoint &point) Q_DECL_NOTHROW
{ std::swap(d, point.d); } { std::swap(d, point.d); }
VPointF P() const; VPointF P() const;
@ -96,7 +96,7 @@ public:
VSplinePoint &operator=(VSplinePoint &&point) Q_DECL_NOTHROW { Swap(point); return *this; } VSplinePoint &operator=(VSplinePoint &&point) Q_DECL_NOTHROW { Swap(point); return *this; }
#endif #endif
void Swap(VSplinePoint &point) Q_DECL_NOTHROW inline void Swap(VSplinePoint &point) Q_DECL_NOTHROW
{ std::swap(d, point.d); } { std::swap(d, point.d); }
VPointF P() const; VPointF P() const;

View File

@ -151,7 +151,7 @@ public:
VAbstractPiece &operator=(VAbstractPiece &&piece) Q_DECL_NOTHROW { Swap(piece); return *this; } VAbstractPiece &operator=(VAbstractPiece &&piece) Q_DECL_NOTHROW { Swap(piece); return *this; }
#endif #endif
void Swap(VAbstractPiece &piece) Q_DECL_NOTHROW inline void Swap(VAbstractPiece &piece) Q_DECL_NOTHROW
{ std::swap(d, piece.d); } { std::swap(d, piece.d); }
QString GetName() const; QString GetName() const;

View File

@ -58,7 +58,7 @@ public:
VContour &operator=(VContour &&contour) Q_DECL_NOTHROW { Swap(contour); return *this; } VContour &operator=(VContour &&contour) Q_DECL_NOTHROW { Swap(contour); return *this; }
#endif #endif
void Swap(VContour &contour) Q_DECL_NOTHROW inline void Swap(VContour &contour) Q_DECL_NOTHROW
{ std::swap(d, contour.d); } { std::swap(d, contour.d); }
void SetContour(const QVector<QPointF> &contour); void SetContour(const QVector<QPointF> &contour);

View File

@ -60,7 +60,7 @@ public:
VLayoutPaper &operator=(VLayoutPaper &&paper) Q_DECL_NOTHROW { Swap(paper); return *this; } VLayoutPaper &operator=(VLayoutPaper &&paper) Q_DECL_NOTHROW { Swap(paper); return *this; }
#endif #endif
void Swap(VLayoutPaper &paper) Q_DECL_NOTHROW inline void Swap(VLayoutPaper &paper) Q_DECL_NOTHROW
{ std::swap(d, paper.d); } { std::swap(d, paper.d); }
int GetHeight() const; int GetHeight() const;

View File

@ -68,7 +68,7 @@ public:
VLayoutPiece &operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW { Swap(detail); return *this; } VLayoutPiece &operator=(VLayoutPiece &&detail) Q_DECL_NOTHROW { Swap(detail); return *this; }
#endif #endif
void Swap(VLayoutPiece &detail) Q_DECL_NOTHROW inline void Swap(VLayoutPiece &detail) Q_DECL_NOTHROW
{ VAbstractPiece::Swap(detail); std::swap(d, detail.d); } { VAbstractPiece::Swap(detail); std::swap(d, detail.d); }
static VLayoutPiece Create(const VPiece &piece, const VContainer *pattern); static VLayoutPiece Create(const VPiece &piece, const VContainer *pattern);

View File

@ -49,7 +49,7 @@ public:
VLayoutPiecePath &operator=(VLayoutPiecePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; } VLayoutPiecePath &operator=(VLayoutPiecePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; }
#endif #endif
void Swap(VLayoutPiecePath &path) Q_DECL_NOTHROW inline void Swap(VLayoutPiecePath &path) Q_DECL_NOTHROW
{ std::swap(d, path.d); } { std::swap(d, path.d); }
QPainterPath GetPainterPath() const; QPainterPath GetPainterPath() const;

View File

@ -47,7 +47,7 @@ public:
VAbstractFloatItemData &operator=(VAbstractFloatItemData &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VAbstractFloatItemData &operator=(VAbstractFloatItemData &&data) Q_DECL_NOTHROW { Swap(data); return *this; }
#endif #endif
void Swap(VAbstractFloatItemData &data) Q_DECL_NOTHROW inline void Swap(VAbstractFloatItemData &data) Q_DECL_NOTHROW
{ std::swap(d, data.d); } { std::swap(d, data.d); }
// methods, which set and return values of different parameters // methods, which set and return values of different parameters

View File

@ -54,7 +54,7 @@ public:
VGrainlineData &operator=(VGrainlineData &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VGrainlineData &operator=(VGrainlineData &&data) Q_DECL_NOTHROW { Swap(data); return *this; }
#endif #endif
void Swap(VGrainlineData &data) Q_DECL_NOTHROW inline void Swap(VGrainlineData &data) Q_DECL_NOTHROW
{ VAbstractFloatItemData::Swap(data); std::swap(d, data.d); } { VAbstractFloatItemData::Swap(data); std::swap(d, data.d); }
// methods, which set and return values of different parameters // methods, which set and return values of different parameters

View File

@ -51,7 +51,7 @@ public:
VPatternLabelData &operator=(VPatternLabelData &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VPatternLabelData &operator=(VPatternLabelData &&data) Q_DECL_NOTHROW { Swap(data); return *this; }
#endif #endif
void Swap(VPatternLabelData &data) Q_DECL_NOTHROW inline void Swap(VPatternLabelData &data) Q_DECL_NOTHROW
{ VAbstractFloatItemData::Swap(data); std::swap(d, data.d); } { VAbstractFloatItemData::Swap(data); std::swap(d, data.d); }
// methods, which set up label parameters // methods, which set up label parameters

View File

@ -54,7 +54,7 @@ public:
VPieceLabelData &operator=(VPieceLabelData &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VPieceLabelData &operator=(VPieceLabelData &&data) Q_DECL_NOTHROW { Swap(data); return *this; }
#endif #endif
void Swap(VPieceLabelData &data) Q_DECL_NOTHROW inline void Swap(VPieceLabelData &data) Q_DECL_NOTHROW
{ VPatternLabelData::Swap(data); std::swap(d, data.d); } { VPatternLabelData::Swap(data); std::swap(d, data.d); }
void Clear(); void Clear();

View File

@ -52,7 +52,7 @@ public:
VCurveVariable &operator=(VCurveVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VCurveVariable &operator=(VCurveVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; }
#endif #endif
void Swap(VCurveVariable &var) Q_DECL_NOTHROW inline void Swap(VCurveVariable &var) Q_DECL_NOTHROW
{ VInternalVariable::Swap(var); std::swap(d, var.d); } { VInternalVariable::Swap(var); std::swap(d, var.d); }
virtual bool Filter(quint32 id) Q_DECL_OVERRIDE; virtual bool Filter(quint32 id) Q_DECL_OVERRIDE;

View File

@ -58,7 +58,7 @@ public:
VIncrement &operator=(VIncrement &&incr) Q_DECL_NOTHROW { Swap(incr); return *this; } VIncrement &operator=(VIncrement &&incr) Q_DECL_NOTHROW { Swap(incr); return *this; }
#endif #endif
void Swap(VIncrement &incr) Q_DECL_NOTHROW inline void Swap(VIncrement &incr) Q_DECL_NOTHROW
{ VVariable::Swap(incr); std::swap(d, incr.d); } { VVariable::Swap(incr); std::swap(d, incr.d); }
quint32 getIndex() const; quint32 getIndex() const;

View File

@ -51,7 +51,7 @@ public:
VInternalVariable &operator=(VInternalVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VInternalVariable &operator=(VInternalVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; }
#endif #endif
void Swap(VInternalVariable &var) Q_DECL_NOTHROW inline void Swap(VInternalVariable &var) Q_DECL_NOTHROW
{ std::swap(d, var.d); } { std::swap(d, var.d); }
virtual qreal GetValue() const; virtual qreal GetValue() const;

View File

@ -53,7 +53,7 @@ public:
VLineAngle &operator=(VLineAngle &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VLineAngle &operator=(VLineAngle &&var) Q_DECL_NOTHROW { Swap(var); return *this; }
#endif #endif
void Swap(VLineAngle &var) Q_DECL_NOTHROW inline void Swap(VLineAngle &var) Q_DECL_NOTHROW
{ VInternalVariable::Swap(var); std::swap(d, var.d); } { VInternalVariable::Swap(var); std::swap(d, var.d); }
virtual bool Filter(quint32 id) Q_DECL_OVERRIDE; virtual bool Filter(quint32 id) Q_DECL_OVERRIDE;

View File

@ -55,7 +55,7 @@ public:
VLengthLine &operator=(VLengthLine &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VLengthLine &operator=(VLengthLine &&var) Q_DECL_NOTHROW { Swap(var); return *this; }
#endif #endif
void Swap(VLengthLine &var) Q_DECL_NOTHROW inline void Swap(VLengthLine &var) Q_DECL_NOTHROW
{ VInternalVariable::Swap(var); std::swap(d, var.d); } { VInternalVariable::Swap(var); std::swap(d, var.d); }
virtual bool Filter(quint32 id) Q_DECL_OVERRIDE; virtual bool Filter(quint32 id) Q_DECL_OVERRIDE;

View File

@ -65,7 +65,7 @@ public:
VMeasurement &operator=(VMeasurement &&m) Q_DECL_NOTHROW { Swap(m); return *this; } VMeasurement &operator=(VMeasurement &&m) Q_DECL_NOTHROW { Swap(m); return *this; }
#endif #endif
void Swap(VMeasurement &m) Q_DECL_NOTHROW inline void Swap(VMeasurement &m) Q_DECL_NOTHROW
{ VVariable::Swap(m); std::swap(d, m.d); } { VVariable::Swap(m); std::swap(d, m.d); }
QString GetGuiText() const; QString GetGuiText() const;

View File

@ -55,7 +55,7 @@ public:
VVariable &operator=(VVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; } VVariable &operator=(VVariable &&var) Q_DECL_NOTHROW { Swap(var); return *this; }
#endif #endif
void Swap(VVariable &var) Q_DECL_NOTHROW inline void Swap(VVariable &var) Q_DECL_NOTHROW
{ VInternalVariable::Swap(var); std::swap(d, var.d); } { VInternalVariable::Swap(var); std::swap(d, var.d); }
QString GetDescription() const; QString GetDescription() const;

View File

@ -127,7 +127,7 @@ public:
VContainer &operator=(VContainer &&data) Q_DECL_NOTHROW { Swap(data); return *this; } VContainer &operator=(VContainer &&data) Q_DECL_NOTHROW { Swap(data); return *this; }
#endif #endif
void Swap(VContainer &data) Q_DECL_NOTHROW inline void Swap(VContainer &data) Q_DECL_NOTHROW
{ std::swap(d, data.d); } { std::swap(d, data.d); }
template <typename T> template <typename T>

View File

@ -77,7 +77,7 @@ public:
VNodeDetail &operator=(VNodeDetail &&node) Q_DECL_NOTHROW { Swap(node); return *this; } VNodeDetail &operator=(VNodeDetail &&node) Q_DECL_NOTHROW { Swap(node); return *this; }
#endif #endif
void Swap(VNodeDetail &node) Q_DECL_NOTHROW inline void Swap(VNodeDetail &node) Q_DECL_NOTHROW
{ std::swap(d, node.d); } { std::swap(d, node.d); }
/** /**

View File

@ -60,7 +60,7 @@ public:
VPiece &operator=(VPiece &&piece) Q_DECL_NOTHROW { Swap(piece); return *this; } VPiece &operator=(VPiece &&piece) Q_DECL_NOTHROW { Swap(piece); return *this; }
#endif #endif
void Swap(VPiece &piece) Q_DECL_NOTHROW inline void Swap(VPiece &piece) Q_DECL_NOTHROW
{ VAbstractPiece::Swap(piece); std::swap(d, piece.d); } { VAbstractPiece::Swap(piece); std::swap(d, piece.d); }
VPiecePath GetPath() const; VPiecePath GetPath() const;

View File

@ -52,7 +52,7 @@ public:
VPieceNode &operator=(VPieceNode &&node) Q_DECL_NOTHROW { Swap(node); return *this; } VPieceNode &operator=(VPieceNode &&node) Q_DECL_NOTHROW { Swap(node); return *this; }
#endif #endif
void Swap(VPieceNode &node) Q_DECL_NOTHROW inline void Swap(VPieceNode &node) Q_DECL_NOTHROW
{ std::swap(d, node.d); } { std::swap(d, node.d); }
friend QDataStream& operator<<(QDataStream& out, const VPieceNode& p); friend QDataStream& operator<<(QDataStream& out, const VPieceNode& p);

View File

@ -57,7 +57,7 @@ public:
VPiecePath &operator=(VPiecePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; } VPiecePath &operator=(VPiecePath &&path) Q_DECL_NOTHROW { Swap(path); return *this; }
#endif #endif
void Swap(VPiecePath &path) Q_DECL_NOTHROW inline void Swap(VPiecePath &path) Q_DECL_NOTHROW
{ std::swap(d, path.d); } { std::swap(d, path.d); }
void Append(const VPieceNode &node); void Append(const VPieceNode &node);