diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-08 14:17:04 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-09 12:22:15 +0200 |
commit | 93bd28e6d4ac8fdb6b07b30684e6b17ee515e44e (patch) | |
tree | 47c1299f1f7341e55c3c21d82425804aef2ac976 /tests/manual/custom-mesh-cpp | |
parent | 1f7408d26d0274c9cbbfb2394778c721888af291 (diff) |
Use QList instead of QVector in tests
Fix some const correctness.
Use list-initialization.
Task-number: QTBUG-84469
Change-Id: I48e643bd20e21bee031555af598ad95d9873de12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests/manual/custom-mesh-cpp')
-rw-r--r-- | tests/manual/custom-mesh-cpp/main.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/manual/custom-mesh-cpp/main.cpp b/tests/manual/custom-mesh-cpp/main.cpp index dee8363d8..de54d3994 100644 --- a/tests/manual/custom-mesh-cpp/main.cpp +++ b/tests/manual/custom-mesh-cpp/main.cpp @@ -149,11 +149,10 @@ int main(int argc, char* argv[]) QVector3D blue(0.0f, 0.0f, 1.0f); QVector3D white(1.0f, 1.0f, 1.0f); - const QVector<QVector3D> vertices = QVector<QVector3D>() - << v0 << n0 << red - << v1 << n1 << blue - << v2 << n2 << green - << v3 << n3 << white; + const QList<QVector3D> vertices = { v0, n0, red, + v1, n1, blue, + v2, n2, green, + v3, n3, white }; float *rawVertexArray = reinterpret_cast<float *>(vertexBufferData.data()); int idx = 0; |