Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2018-03-11 22:09:26 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2018-03-11 22:59:49 +0300
commita2cc85b2649a72707275b7b44908c3f936cd25ea (patch)
treeaf1ead0d9a45dd7d4140f75f44529c38dbae082c
parentca11ef7fd3de97f8f56d3b1a27972fd23eb6cea8 (diff)
Cleanup Collada: Avoid unintentional reuse of previous defined variable
The variable child was redeclared multiple times in the same function. While this has not created any issues i still changed this to avoid confusion and keep the usage of the variables more local.
-rw-r--r--source/blender/collada/ArmatureImporter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 0ea8324ed7c..c62aa054176 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -282,12 +282,11 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone
BoneExtensionMap &extended_bones = bone_extension_manager.getExtensionMap(armature);
BoneExtended *dominant_child = NULL;
int maxlen = 0;
- Bone *child;
if (parentbone == NULL)
return;
- child = (Bone *)parentbone->childbase.first;
+ Bone *child = (Bone *)parentbone->childbase.first;
if (child && (import_settings->find_chains || child->next==NULL)) {
for (; child; child = child->next) {
BoneExtended *be = extended_bones[child->name];
@@ -337,8 +336,8 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone
}
}
}
- for (Bone *child = (Bone *)parentbone->childbase.first; child; child = child->next) {
- ArmatureImporter::connect_bone_chains(armature, child, UNLIMITED_CHAIN_MAX);
+ for (Bone *ch = (Bone *)parentbone->childbase.first; ch; ch = ch->next) {
+ ArmatureImporter::connect_bone_chains(armature, ch, UNLIMITED_CHAIN_MAX);
}
}
else if (maxlen>1 && maxlen > this->import_settings->min_chain_length) {
@@ -348,8 +347,8 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone
else {
/* can't connect this Bone. Proceed with children ... */
if (pbe) pbe->set_leaf_bone(true);
- for (Bone *child = (Bone *)parentbone->childbase.first; child; child = child->next) {
- ArmatureImporter::connect_bone_chains(armature, child, UNLIMITED_CHAIN_MAX);
+ for (Bone *ch = (Bone *)parentbone->childbase.first; ch; ch = ch->next) {
+ ArmatureImporter::connect_bone_chains(armature, ch, UNLIMITED_CHAIN_MAX);
}
}