diff options
author | Mike Krus <mike.krus@kdab.com> | 2017-05-01 14:45:51 +0100 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2017-05-02 08:47:08 +0000 |
commit | 5e86850397399d6fbd11173c428e2dac8a4c1682 (patch) | |
tree | e07a7c8924274e99aa45b892dee92b4f136abae6 /src/plugins/sceneparsers/gltfexport/gltfexporter.cpp | |
parent | 348956c8e270d0c38f495201b99b21634c75b0fa (diff) |
Remove unneeded temporary container (clazy reports)
Change-Id: I2a7a94d7b2791382699b39dda1189bc78ce0ff06
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins/sceneparsers/gltfexport/gltfexporter.cpp')
-rw-r--r-- | src/plugins/sceneparsers/gltfexport/gltfexporter.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp index fce7d5881..571607fc4 100644 --- a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp +++ b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp @@ -1153,7 +1153,8 @@ bool GLTFExporter::saveScene() QVector<MeshInfo::BufferView> bvList; QVector<MeshInfo::Accessor> accList; - for (auto &mi : m_meshInfo.values()) { + for (auto it = m_meshInfo.begin(); it != m_meshInfo.end(); ++it) { + auto &mi = it.value(); for (auto &v : mi.views) bvList << v; for (auto &acc : mi.accessors) @@ -1220,7 +1221,8 @@ bool GLTFExporter::saveScene() m_obj["accessors"] = accessors; QJsonObject meshes; - for (const auto &meshInfo : m_meshInfo.values()) { + for (auto it = m_meshInfo.begin(); it != m_meshInfo.end(); ++it) { + auto &meshInfo = it.value(); QJsonObject mesh; mesh["name"] = meshInfo.originalName; if (meshInfo.meshType != TypeNone) { @@ -1251,7 +1253,8 @@ bool GLTFExporter::saveScene() m_obj["meshes"] = meshes; QJsonObject cameras; - for (const auto &camInfo : m_cameraInfo.values()) { + for (auto it = m_cameraInfo.begin(); it != m_cameraInfo.end(); ++it) { + const auto &camInfo = it.value(); QJsonObject camera; QJsonObject proj; proj["znear"] = camInfo.znear; @@ -1305,7 +1308,8 @@ bool GLTFExporter::saveScene() // Lights must be declared as extensions to the top-level glTF object QJsonObject lights; - for (const auto &lightInfo : m_lightInfo.values()) { + for (auto it = m_lightInfo.begin(); it != m_lightInfo.end(); ++it) { + const auto &lightInfo = it.value(); QJsonObject light; QJsonObject lightDetails; QString type; |