LibWasm: Do not resize() the function signature list to preallocate

Instead, use `ensure_capacity()`.
This commit is contained in:
Ali Mohammad Pur 2021-05-03 23:07:28 +04:30 committed by Andreas Kling
parent 025b3349e4
commit faa34a0a8b
Notes: sideshowbarker 2024-07-18 17:54:40 +09:00

View File

@ -800,7 +800,7 @@ ParseResult<FunctionSection> FunctionSection::parse(InputStream& stream)
return indices.error();
Vector<TypeIndex> typed_indices;
typed_indices.resize(indices.value().size());
typed_indices.ensure_capacity(indices.value().size());
for (auto entry : indices.value())
typed_indices.append(entry);