summaryrefslogtreecommitdiffstats
path: root/src/gui/math3d/qquaternion.h
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-02-02 05:24:02 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-02-02 05:24:02 (GMT)
commit07e565096c5d209a16102f1d41c7ada8544a77d3 (patch)
tree9b5211f8fa45319fad231b85672be86b9dbfb527 /src/gui/math3d/qquaternion.h
parent364ecfa36d6d4dc0aa917a223e88869028d8219c (diff)
downloadQt-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/qquaternion.h')
-rw-r--r--src/gui/math3d/qquaternion.h2
1 files changed, 2 insertions, 0 deletions
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) {}