mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-31 23:22:03 +03:00
LibWasm: Do not resize() the function signature list to preallocate
Instead, use `ensure_capacity()`.
This commit is contained in:
parent
025b3349e4
commit
faa34a0a8b
Notes:
sideshowbarker
2024-07-18 17:54:40 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/faa34a0a8b9 Pull-request: https://github.com/SerenityOS/serenity/pull/7097 Reviewed-by: https://github.com/Dexesttp
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user