diff options
Diffstat (limited to 'src/plugins/sceneparsers/gltf/gltfimporter.cpp')
-rw-r--r-- | src/plugins/sceneparsers/gltf/gltfimporter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp index 916589ffa..6f61d2ed9 100644 --- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp +++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp @@ -1072,8 +1072,8 @@ void GLTFImporter::cleanup() m_shaderPaths.clear(); delete_if_without_parent(m_programs); m_programs.clear(); - for (auto params : m_techniqueParameters.values()) - delete_if_without_parent(params); + for (auto it = m_techniqueParameters.begin(); it != m_techniqueParameters.end(); ++it) + delete_if_without_parent(it.value()); m_techniqueParameters.clear(); delete_if_without_parent(m_techniques); m_techniques.clear(); @@ -1546,7 +1546,7 @@ void GLTFImporter::processJSONExtensions(const QString &id, const QJsonObject &j // level GLTF item. if (id == KEY_COMMON_MAT) { const auto lights = jsonObject.value(KEY_LIGHTS).toObject(); - for (auto lightKey : lights.keys()) { + for (const auto &lightKey : lights.keys()) { const auto light = lights.value(lightKey).toObject(); auto lightType = light.value(KEY_TYPE).toString(); const auto lightValues = light.value(lightType).toObject(); |