summaryrefslogtreecommitdiffstats
path: root/src/plugins/sceneparsers
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2017-12-27 15:28:00 +0000
committerSean Harmer <sean.harmer@kdab.com>2018-01-13 16:15:22 +0000
commite5c16bb630345e819e8eeaf1733eeca694afe6ae (patch)
treec98fb6926fbb70eef0fb5018217fe66f37fb9c18 /src/plugins/sceneparsers
parentc3b7cbd713c2434e91f0a2e306e6092037b5035f (diff)
Iterate on references to avoid copies
Found by Clazy clazy-range-loop Change-Id: Ib2d7f4073cbe7b5b2280518d5dc92981b56541cc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins/sceneparsers')
-rw-r--r--src/plugins/sceneparsers/assimp/assimpimporter.cpp2
-rw-r--r--src/plugins/sceneparsers/gltf/gltfimporter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sceneparsers/assimp/assimpimporter.cpp b/src/plugins/sceneparsers/assimp/assimpimporter.cpp
index 3f110e1e0..5af2104c5 100644
--- a/src/plugins/sceneparsers/assimp/assimpimporter.cpp
+++ b/src/plugins/sceneparsers/assimp/assimpimporter.cpp
@@ -380,7 +380,7 @@ AssimpImporter::~AssimpImporter()
*/
bool AssimpImporter::areAssimpExtensions(const QStringList &extensions)
{
- for (const auto ext : qAsConst(extensions))
+ for (const auto &ext : qAsConst(extensions))
if (AssimpImporter::assimpSupportedFormatsList.contains(ext.toLower()))
return true;
return false;
diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp
index 4419bd708..426194746 100644
--- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp
+++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp
@@ -1107,7 +1107,7 @@ void GLTFImporter::cleanup()
m_shaderPaths.clear();
delete_if_without_parent(m_programs);
m_programs.clear();
- for (auto params : qAsConst(m_techniqueParameters))
+ for (const auto &params : qAsConst(m_techniqueParameters))
delete_if_without_parent(params);
m_techniqueParameters.clear();
delete_if_without_parent(m_techniques);