diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-02 05:24:02 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-02 05:24:02 (GMT) |
commit | 07e565096c5d209a16102f1d41c7ada8544a77d3 (patch) | |
tree | 9b5211f8fa45319fad231b85672be86b9dbfb527 /src/gui/math3d | |
parent | 364ecfa36d6d4dc0aa917a223e88869028d8219c (diff) | |
download | Qt-07e565096c5d209a16102f1d41c7ada8544a77d3.zip Qt-07e565096c5d209a16102f1d41c7ada8544a77d3.tar.gz Qt-07e565096c5d209a16102f1d41c7ada8544a77d3.tar.bz2 |
Add Q_MOVABLE_TYPE decls to QVector?D, QMatrix4x4, QQuaternion
Marking these types are movable allows container classes
to optimize for their unique properties.
Reviewed-by: Sarah Smith
Reviewed-by: Daniel Pope
Diffstat (limited to 'src/gui/math3d')
-rw-r--r-- | src/gui/math3d/qmatrix4x4.h | 2 | ||||
-rw-r--r-- | src/gui/math3d/qquaternion.h | 2 | ||||
-rw-r--r-- | src/gui/math3d/qvector2d.h | 2 | ||||
-rw-r--r-- | src/gui/math3d/qvector3d.h | 2 | ||||
-rw-r--r-- | src/gui/math3d/qvector4d.h | 2 |
5 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index f9902d7..0671fa8 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -208,6 +208,8 @@ private: friend class QGraphicsRotation; }; +Q_DECLARE_TYPEINFO(QMatrix4x4, Q_MOVABLE_TYPE); + inline QMatrix4x4::QMatrix4x4 (qreal m11, qreal m12, qreal m13, qreal m14, qreal m21, qreal m22, qreal m23, qreal m24, diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h index a446f28..16aa5d0 100644 --- a/src/gui/math3d/qquaternion.h +++ b/src/gui/math3d/qquaternion.h @@ -136,6 +136,8 @@ private: qreal wp, xp, yp, zp; }; +Q_DECLARE_TYPEINFO(QQuaternion, Q_MOVABLE_TYPE); + inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {} inline QQuaternion::QQuaternion(qreal aScalar, qreal xpos, qreal ypos, qreal zpos) : wp(aScalar), xp(xpos), yp(ypos), zp(zpos) {} diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h index d76f35a..c92c5e0 100644 --- a/src/gui/math3d/qvector2d.h +++ b/src/gui/math3d/qvector2d.h @@ -126,6 +126,8 @@ private: friend class QVector4D; }; +Q_DECLARE_TYPEINFO(QVector2D, Q_MOVABLE_TYPE); + inline QVector2D::QVector2D() : xp(0.0f), yp(0.0f) {} inline QVector2D::QVector2D(float xpos, float ypos, int) : xp(xpos), yp(ypos) {} diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h index 80c7152..2fdd1d3 100644 --- a/src/gui/math3d/qvector3d.h +++ b/src/gui/math3d/qvector3d.h @@ -141,6 +141,8 @@ private: #endif }; +Q_DECLARE_TYPEINFO(QVector3D, Q_MOVABLE_TYPE); + inline QVector3D::QVector3D() : xp(0.0f), yp(0.0f), zp(0.0f) {} inline QVector3D::QVector3D(qreal xpos, qreal ypos, qreal zpos) : xp(xpos), yp(ypos), zp(zpos) {} diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h index 4af2961..a383fbb 100644 --- a/src/gui/math3d/qvector4d.h +++ b/src/gui/math3d/qvector4d.h @@ -138,6 +138,8 @@ private: #endif }; +Q_DECLARE_TYPEINFO(QVector4D, Q_MOVABLE_TYPE); + inline QVector4D::QVector4D() : xp(0.0f), yp(0.0f), zp(0.0f), wp(0.0f) {} inline QVector4D::QVector4D(qreal xpos, qreal ypos, qreal zpos, qreal wpos) : xp(xpos), yp(ypos), zp(zpos), wp(wpos) {} |