fix Collada: wrong usage of pointer and hidden redeclaration
authorGaia Clary <gaia.clary@machinimatrix.org>
Sun, 11 Mar 2018 19:32:47 +0000 (20:32 +0100)
committerGaia Clary <gaia.clary@machinimatrix.org>
Sun, 11 Mar 2018 19:59:50 +0000 (20:59 +0100)
commit2c9c22df26dfdcf03bb308fdf35294ed79c2d0e5
treebafd0995f9329e90c4afd96787f450348592c8cd
parent49a7cd1ba4e43607aa42a26222beef353c528bac
fix Collada: wrong usage of pointer and hidden redeclaration

* Suspicious usage of pointer:

  short *type = 0; // this creates a null pointer

When this is later used for anything then blender would crash.
After following the code and check what happens i strongly believe
the author wanted to use a short and not a pointer to a short here.

* local variable where reused later in same function
While this did no harm, i still felt it was better to use a different
name here to make things more separated:

- moved variable declaraiotns into loop (for int a=0; ...)
- renamed uv_images to uv_image_set
- renamed index variable from i to j in inner loop that
  reused same index name from outer loop
source/blender/collada/DocumentImporter.cpp
source/blender/collada/GeometryExporter.cpp
source/blender/collada/ImageExporter.cpp
source/blender/collada/MeshImporter.cpp