summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSergio Martins <sergio.martins@kdab.com>2016-12-10 17:09:13 +0000
committerSean Harmer <sean.harmer@kdab.com>2017-04-02 13:02:32 +0000
commit172287f824b740a7e2ce75e811c0858cbe0c40c1 (patch)
treee0cba921f07f8cb5de9aea7b8132a1b8596cbc32 /src/plugins
parent0ba3824ac24cb435c095713e24250c87d184fd97 (diff)
Don't allocate temporary containers while iterating
Fixes all clazy-container-anti-pattern warnings. Change-Id: I399e333ef9b4731667cd698cd3882e0fdd63a857 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/sceneparsers/gltf/gltfimporter.cpp2
-rw-r--r--src/plugins/sceneparsers/gltfexport/gltfexporter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp
index c026594bf..4544bc5c3 100644
--- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp
+++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp
@@ -1072,7 +1072,7 @@ void GLTFImporter::cleanup()
m_shaderPaths.clear();
delete_if_without_parent(m_programs);
m_programs.clear();
- for (auto params : m_techniqueParameters.values())
+ for (auto params : qAsConst(m_techniqueParameters))
delete_if_without_parent(params);
m_techniqueParameters.clear();
delete_if_without_parent(m_techniques);
diff --git a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
index 7332fa6b5..ba0649d3b 100644
--- a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
+++ b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
@@ -1249,7 +1249,7 @@ bool GLTFExporter::saveScene()
m_obj["meshes"] = meshes;
QJsonObject cameras;
- for (auto camInfo : m_cameraInfo.values()) {
+ for (auto camInfo : qAsConst(m_cameraInfo)) {
QJsonObject camera;
QJsonObject proj;
proj["znear"] = camInfo.znear;