Cleanup Collada: Make sure index variables are not reused
authorGaia Clary <gaia.clary@machinimatrix.org>
Sun, 11 Mar 2018 18:57:40 +0000 (19:57 +0100)
committerGaia Clary <gaia.clary@machinimatrix.org>
Sun, 11 Mar 2018 19:59:49 +0000 (20:59 +0100)
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.

source/blender/collada/AnimationImporter.cpp

index 0b61f7fa8b2bee8b795edb5a9e9a84b2e887a525..f7ea8342eae63fa84353e61f22123d1189744c8c 100644 (file)
@@ -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);
                                }