From 0a34745ff9c002a3b28a723b1e3ab984565ea49b Mon Sep 17 00:00:00 2001 From: Ken Cooke Date: Tue, 25 Jun 2019 12:53:07 -0700 Subject: [PATCH] Use QVector resize() instead of reserve() to silence Debug builds about size not being set. Causes unneeded default initialization, but no obvious way to avoid. --- libraries/render-utils/src/Model.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 11c1e42fd4..ce3ff51502 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -1777,13 +1777,13 @@ void Blender::run() { // allocate the required sizes QVector blendedMeshSizes; - blendedMeshSizes.reserve(numMeshes); + blendedMeshSizes.resize(numMeshes); QVector packedBlendshapeOffsets; - packedBlendshapeOffsets.reserve(numBlendshapeOffsets); + packedBlendshapeOffsets.resize(numBlendshapeOffsets); QVector unpackedBlendshapeOffsets; - unpackedBlendshapeOffsets.reserve(maxBlendshapeOffsets); // reuse for all meshes + unpackedBlendshapeOffsets.resize(maxBlendshapeOffsets); // reuse for all meshes int offset = 0; for (auto meshIter = _hfmModel->meshes.cbegin(); meshIter != _hfmModel->meshes.cend(); ++meshIter) {