From 7952ece01b0d040b87b1452ef2d19bd4674ae600 Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Sun, 11 Mar 2018 20:12:55 +0100 Subject: Cleanup: avoid redeclaration of iterator in same function The iterator was redeclared 3 times. I fixed this to avoid future issues. I commit separately because so the changes are less cluttered all over the place. --- source/blender/collada/DocumentImporter.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/collada') diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index f7fdfb06a40..19825afc758 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -190,8 +190,8 @@ void DocumentImporter::finish() std::vector *objects_to_scale = new std::vector(); /** TODO Break up and put into 2-pass parsing of DAE */ - std::vector::iterator it; - for (it = vscenes.begin(); it != vscenes.end(); it++) { + std::vector::iterator sit; + for (sit = vscenes.begin(); sit != vscenes.end(); sit++) { PointerRNA sceneptr, unit_settings; PropertyRNA *system, *scale; @@ -222,7 +222,7 @@ void DocumentImporter::finish() } // Write nodes to scene - const COLLADAFW::NodePointerArray& roots = (*it)->getRootNodes(); + const COLLADAFW::NodePointerArray& roots = (*sit)->getRootNodes(); for (unsigned int i = 0; i < roots.getCount(); i++) { std::vector *objects_done = write_node(roots[i], NULL, sce, NULL, false); objects_to_scale->insert(objects_to_scale->end(), objects_done->begin(), objects_done->end()); @@ -247,8 +247,8 @@ void DocumentImporter::finish() armature_importer.fix_animation(); #endif - for (std::vector::iterator it = vscenes.begin(); it != vscenes.end(); it++) { - const COLLADAFW::NodePointerArray& roots = (*it)->getRootNodes(); + for (std::vector::iterator vsit = vscenes.begin(); vsit != vscenes.end(); vsit++) { + const COLLADAFW::NodePointerArray& roots = (*vsit)->getRootNodes(); for (unsigned int i = 0; i < roots.getCount(); i++) { translate_anim_recursive(roots[i], NULL, NULL); @@ -260,9 +260,9 @@ void DocumentImporter::finish() fprintf(stderr, "got %d library nodes to free\n", (int)libnode_ob.size()); // free all library_nodes - std::vector::iterator it; - for (it = libnode_ob.begin(); it != libnode_ob.end(); it++) { - Object *ob = *it; + std::vector::iterator lit; + for (lit = libnode_ob.begin(); lit != libnode_ob.end(); lit++) { + Object *ob = *lit; Base *base = BKE_scene_base_find(sce, ob); if (base) { -- cgit v1.2.3