QPolygon(F): add some move ctors
Change-Id: Ib0eb071e371a7198db26d4279bb901e49b3da2fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
6e42a1ad4e
commit
2c41d6f7a1
|
|
@ -52,11 +52,15 @@ public:
|
|||
inline QPolygon() {}
|
||||
inline ~QPolygon() {}
|
||||
inline explicit QPolygon(int size);
|
||||
inline QPolygon(const QPolygon &a) : QVector<QPoint>(a) {}
|
||||
inline /*implicit*/ QPolygon(const QVector<QPoint> &v) : QVector<QPoint>(v) {}
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
/*implicit*/ QPolygon(QVector<QPoint> &&v) Q_DECL_NOTHROW : QVector<QPoint>(std::move(v)) {}
|
||||
#endif
|
||||
QPolygon(const QRect &r, bool closed=false);
|
||||
QPolygon(int nPoints, const int *points);
|
||||
QPolygon(const QPolygon &other) : QVector<QPoint>(other) {}
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
QPolygon(QPolygon &&other) Q_DECL_NOTHROW : QVector<QPoint>(std::move(other)) {}
|
||||
QPolygon &operator=(QPolygon &&other) Q_DECL_NOTHROW { swap(other); return *this; }
|
||||
#endif
|
||||
QPolygon &operator=(const QPolygon &other) { QVector<QPoint>::operator=(other); return *this; }
|
||||
|
|
@ -130,11 +134,15 @@ public:
|
|||
inline QPolygonF() {}
|
||||
inline ~QPolygonF() {}
|
||||
inline explicit QPolygonF(int size);
|
||||
inline QPolygonF(const QPolygonF &a) : QVector<QPointF>(a) {}
|
||||
inline /*implicit*/ QPolygonF(const QVector<QPointF> &v) : QVector<QPointF>(v) {}
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
/* implicit */ QPolygonF(QVector<QPointF> &&v) Q_DECL_NOTHROW : QVector<QPointF>(std::move(v)) {}
|
||||
#endif
|
||||
QPolygonF(const QRectF &r);
|
||||
/*implicit*/ QPolygonF(const QPolygon &a);
|
||||
inline QPolygonF(const QPolygonF &a) : QVector<QPointF>(a) {}
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
QPolygonF(QPolygonF &&other) Q_DECL_NOTHROW : QVector<QPointF>(std::move(other)) {}
|
||||
QPolygonF &operator=(QPolygonF &&other) Q_DECL_NOTHROW { swap(other); return *this; }
|
||||
#endif
|
||||
QPolygonF &operator=(const QPolygonF &other) { QVector<QPointF>::operator=(other); return *this; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue