diff --git a/assignment-client/src/avatars/ScriptableAvatar.cpp b/assignment-client/src/avatars/ScriptableAvatar.cpp index 044ab86942..383f583327 100644 --- a/assignment-client/src/avatars/ScriptableAvatar.cpp +++ b/assignment-client/src/avatars/ScriptableAvatar.cpp @@ -144,10 +144,10 @@ void ScriptableAvatar::update(float deltatime) { } _animationDetails.currentFrame = currentFrame; - const QVector& modelJoints = _bind->getHFMModel().joints; + const std::vector& modelJoints = _bind->getHFMModel().joints; QStringList animationJointNames = _animation->getJointNames(); - const int nJoints = modelJoints.size(); + const auto nJoints = (int)modelJoints.size(); if (_jointData.size() != nJoints) { _jointData.resize(nJoints); } diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 4c4050c935..4f1d871158 100755 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -1613,7 +1613,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash& hfmModel.meshExtents.minimum -= glm::vec3(EPSILON, EPSILON, EPSILON); hfmModel.meshExtents.maximum += glm::vec3(EPSILON, EPSILON, EPSILON); - mesh.meshIndex = hfmModel.meshes.size(); + mesh.meshIndex = (int)hfmModel.meshes.size(); } ++nodecount; } diff --git a/tools/vhacd-util/src/VHACDUtil.cpp b/tools/vhacd-util/src/VHACDUtil.cpp index a5ad5bc891..3410d35e6a 100644 --- a/tools/vhacd-util/src/VHACDUtil.cpp +++ b/tools/vhacd-util/src/VHACDUtil.cpp @@ -154,7 +154,7 @@ void vhacd::VHACDUtil::fattenMesh(const HFMMesh& mesh, const glm::mat4& modelOff newMeshPart.triangleIndices << index0 << index3 << index1; newMeshPart.triangleIndices << index1 << index3 << index2; newMeshPart.triangleIndices << index2 << index3 << index0; - result.parts.append(newMeshPart); + result.parts.push_back(newMeshPart); } } @@ -259,8 +259,8 @@ void vhacd::VHACDUtil::getConvexResults(VHACD::IVHACD* convexifier, HFMMesh& res VHACD::IVHACD::ConvexHull hull; convexifier->GetConvexHull(j, hull); - resultMesh.parts.append(HFMMeshPart()); - HFMMeshPart& resultMeshPart = resultMesh.parts.last(); + resultMesh.parts.push_back(HFMMeshPart()); + HFMMeshPart& resultMeshPart = resultMesh.parts.back(); int hullIndexStart = resultMesh.vertices.size(); resultMesh.vertices.reserve(hullIndexStart + hull.m_nPoints); @@ -300,8 +300,8 @@ bool vhacd::VHACDUtil::computeVHACD(HFMModel& hfmModel, } // count the mesh-parts - int numParts = 0; - foreach (const HFMMesh& mesh, hfmModel.meshes) { + size_t numParts = 0; + for (const HFMMesh& mesh : hfmModel.meshes) { numParts += mesh.parts.size(); } if (_verbose) { @@ -311,8 +311,8 @@ bool vhacd::VHACDUtil::computeVHACD(HFMModel& hfmModel, VHACD::IVHACD * convexifier = VHACD::CreateVHACD(); result.meshExtents.reset(); - result.meshes.append(HFMMesh()); - HFMMesh &resultMesh = result.meshes.last(); + result.meshes.push_back(HFMMesh()); + HFMMesh &resultMesh = result.meshes.back(); const uint32_t POINT_STRIDE = 3; const uint32_t TRIANGLE_STRIDE = 3; diff --git a/tools/vhacd-util/src/VHACDUtilApp.cpp b/tools/vhacd-util/src/VHACDUtilApp.cpp index 3d675f8baf..61a6b38181 100644 --- a/tools/vhacd-util/src/VHACDUtilApp.cpp +++ b/tools/vhacd-util/src/VHACDUtilApp.cpp @@ -387,7 +387,7 @@ VHACDUtilApp::VHACDUtilApp(int argc, char* argv[]) : } if (verbose) { - int totalHulls = result.meshes[0].parts.size(); + auto totalHulls = result.meshes[0].parts.size(); qDebug() << "output file =" << outputFilename; qDebug() << "vertices =" << totalVertices; qDebug() << "triangles =" << totalTriangles; @@ -402,7 +402,7 @@ VHACDUtilApp::VHACDUtilApp(int argc, char* argv[]) : HFMMesh result; // count the mesh-parts - unsigned int meshCount = 0; + size_t meshCount = 0; foreach (const HFMMesh& mesh, fbx.meshes) { meshCount += mesh.parts.size(); } @@ -412,7 +412,7 @@ VHACDUtilApp::VHACDUtilApp(int argc, char* argv[]) : vUtil.fattenMesh(mesh, fbx.offset, result); } - newFbx.meshes.append(result); + newFbx.meshes.push_back(result); writeOBJ(outputFilename, newFbx, outputCentimeters); } }