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.
This commit is contained in:
Ken Cooke 2019-06-25 12:53:07 -07:00
parent b079e3283e
commit 0a34745ff9

View file

@ -1777,13 +1777,13 @@ void Blender::run() {
// allocate the required sizes
QVector<int> blendedMeshSizes;
blendedMeshSizes.reserve(numMeshes);
blendedMeshSizes.resize(numMeshes);
QVector<BlendshapeOffset> packedBlendshapeOffsets;
packedBlendshapeOffsets.reserve(numBlendshapeOffsets);
packedBlendshapeOffsets.resize(numBlendshapeOffsets);
QVector<BlendshapeOffsetUnpacked> 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) {