diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-09 10:21:55 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-09 12:24:02 +0200 |
commit | 994b476562c0f526833d0f61a3196d3f81c9c736 (patch) | |
tree | 8452d7d642e525392576505ec63634a5b4fa872b /src/render/io/qaxisalignedboundingbox_p.h | |
parent | 39d0041f15601cee499c959702b004cbd721bed9 (diff) |
Use QList instead of QVector in render
Use list-initialization.
Task-number: QTBUG-84469
Change-Id: I826450646fc3c7118cae49c22a28058f47770e13
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/io/qaxisalignedboundingbox_p.h')
-rw-r--r-- | src/render/io/qaxisalignedboundingbox_p.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/render/io/qaxisalignedboundingbox_p.h b/src/render/io/qaxisalignedboundingbox_p.h index c77fa1147..6ed3d9fd4 100644 --- a/src/render/io/qaxisalignedboundingbox_p.h +++ b/src/render/io/qaxisalignedboundingbox_p.h @@ -51,8 +51,8 @@ // We mean it. // +#include <QList> #include <QMatrix4x4> -#include <QVector> #include <QVector3D> #include <Qt3DRender/private/qt3drender_global_p.h> @@ -71,7 +71,7 @@ public: m_radii() {} - inline explicit QAxisAlignedBoundingBox(const QVector<QVector3D> &points) + inline explicit QAxisAlignedBoundingBox(const QList<QVector3D> &points) : m_center(), m_radii() { @@ -86,7 +86,7 @@ public: bool isNull() const { return m_center.isNull() && m_radii.isNull(); } - void Q_3DRENDERSHARED_PRIVATE_EXPORT update(const QVector<QVector3D> &points); + void Q_3DRENDERSHARED_PRIVATE_EXPORT update(const QList<QVector3D> &points); inline QVector3D center() const { return m_center; } inline QVector3D radii() const { return m_radii; } @@ -115,14 +115,12 @@ public: inline void expandToContain(const QVector3D &pt) { - QVector<QVector3D> pts = QVector<QVector3D>() << pt; - update(pts); + update(QList<QVector3D> { pt }); } inline void expandToContain(const QAxisAlignedBoundingBox &other) { - QVector<QVector3D> pts = QVector<QVector3D>() << other.minPoint() << other.maxPoint(); - update(pts); + update(QList<QVector3D> { other.minPoint(), other.maxPoint() }); } inline QAxisAlignedBoundingBox transformBy(const QMatrix4x4 &mat) const |