[Bf-blender-cvs] [2de0daa1796] master: Cleanup Collada: Make sure index variables are not reused

Gaia Clary noreply at git.blender.org
Sun Mar 11 21:00:06 CET 2018


Commit: 2de0daa179617c4eb759f6298485a577e7ee2dfe
Author: Gaia Clary
Date:   Sun Mar 11 19:57:40 2018 +0100
Branches: master
https://developer.blender.org/rB2de0daa179617c4eb759f6298485a577e7ee2dfe

Cleanup Collada: Make sure index variables are not reused

The variables i and j have been declared before in the same function.
I changed the names to mi and mj to keep things clear.

===================================================================

M	source/blender/collada/AnimationImporter.cpp

===================================================================

diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 0b61f7fa8b2..f7ea8342eae 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -1834,14 +1834,14 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
 				}
 
 				COLLADABU::Math::Matrix4 matrix;
-				int i = 0, j = 0;
+				int mi = 0, mj = 0;
 
 				for (std::vector<FCurve *>::iterator it = curves.begin(); it != curves.end(); it++) {
-					matrix.setElement(i, j, evaluate_fcurve(*it, fra));
-					j++;
-					if (j == 4) {
-						i++;
-						j = 0;
+					matrix.setElement(mi, mj, evaluate_fcurve(*it, fra));
+					mj++;
+					if (mj == 4) {
+						mi++;
+						mj = 0;
 					}
 					fcurve_is_used(*it);
 				}



More information about the Bf-blender-cvs mailing list