glTF: Silence uninitialized variable warning

This is a false positive. 'jointNamesIndex' is either set by the loop
or the following conditional is false which also sets it. The undefined value
is never seen by the following code.
This commit is contained in:
Turo Lamminen
2017-09-18 15:18:45 +03:00
parent b74fc9495a
commit 40c308af44
2 changed files with 2 additions and 2 deletions

View File

@@ -541,7 +541,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref<Mesh>& meshRef, Ref<Buf
Ref<Node> nodeRef = mAsset.nodes.Get(aib->mName.C_Str());
nodeRef->jointName = nodeRef->name;
unsigned int jointNamesIndex;
unsigned int jointNamesIndex = 0;
bool addJointToJointNames = true;
for ( unsigned int idx_joint = 0; idx_joint < skinRef->jointNames.size(); ++idx_joint) {
if (skinRef->jointNames[idx_joint]->jointName.compare(nodeRef->jointName) == 0) {