From b15771e9fefb32306a1d697569514925ba13d121 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Thu, 3 Oct 2019 16:47:41 -0700 Subject: [PATCH] Fix build warnings and wrong use of indexOf --- libraries/fbx/src/FBXSerializer.cpp | 5 ++--- libraries/fbx/src/FBXSerializer_Mesh.cpp | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index e7d6000c28..78bc1836c3 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -1416,7 +1416,6 @@ HFMModel* FBXSerializer::extractHFMModel(const hifi::VariantHash& mapping, const const QString& meshID = it.key(); const ExtractedMesh& extracted = it.value(); const auto& partMaterialTextures = extracted.partMaterialTextures; - const auto& newIndices = extracted.newIndices; uint32_t meshIndex = (uint32_t)hfmModel.meshes.size(); meshIDsToMeshIndices.insert(it.key(), meshIndex); @@ -1515,7 +1514,7 @@ HFMModel* FBXSerializer::extractHFMModel(const hifi::VariantHash& mapping, const } auto rootJointIndex = modelIDs.indexOf(modelID); - if (rootJointIndex == hfm::Cluster::INVALID_JOINT_INDEX) { + if (rootJointIndex == -1) { qCDebug(modelformat) << "Model not in model list: " << modelID; rootJointIndex = 0; } @@ -1533,7 +1532,7 @@ HFMModel* FBXSerializer::extractHFMModel(const hifi::VariantHash& mapping, const // of skinning information in FBX QString jointID = _connectionChildMap.value(clusterID); hfmCluster.jointIndex = modelIDs.indexOf(jointID); - if (hfmCluster.jointIndex == hfm::Cluster::INVALID_JOINT_INDEX) { + if (hfmCluster.jointIndex == -1) { qCDebug(modelformat) << "Joint not in model list: " << jointID; hfmCluster.jointIndex = 0; } diff --git a/libraries/fbx/src/FBXSerializer_Mesh.cpp b/libraries/fbx/src/FBXSerializer_Mesh.cpp index f19cd7c526..7c6be5740a 100644 --- a/libraries/fbx/src/FBXSerializer_Mesh.cpp +++ b/libraries/fbx/src/FBXSerializer_Mesh.cpp @@ -492,7 +492,6 @@ ExtractedMesh FBXSerializer::extractMesh(const FBXNode& object, unsigned int& me int& partIndexPlusOne = materialTextureParts[materialTexture]; if (partIndexPlusOne == 0) { data.extracted.mesh.parts.resize(data.extracted.mesh.parts.size() + 1); - HFMMeshPart& part = data.extracted.mesh.parts.back(); // Figure out if this is the older way of defining the per-part material for baked FBX if (dracoMeshNodeVersion < 2) {