1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:24:58 +00:00

Everywhere: Stop using NonnullOwnPtrVector

Same as NonnullRefPtrVector: weird semantics, questionable benefits.
This commit is contained in:
Andreas Kling 2023-03-06 17:16:25 +01:00
parent 689ca370d4
commit 359d6e7b0b
111 changed files with 517 additions and 503 deletions

View file

@ -359,7 +359,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
// First, resolve the linked modules
NonnullOwnPtrVector<Wasm::ModuleInstance> linked_instances;
Vector<NonnullOwnPtr<Wasm::ModuleInstance>> linked_instances;
Vector<Wasm::Module> linked_modules;
for (auto& name : modules_to_link_in) {
auto parse_result = parse(name);
@ -370,7 +370,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
linked_modules.append(parse_result.release_value());
Wasm::Linker linker { linked_modules.last() };
for (auto& instance : linked_instances)
linker.link(instance);
linker.link(*instance);
auto link_result = linker.finish();
if (link_result.is_error()) {
warnln("Linking imported module '{}' failed", name);
@ -387,7 +387,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Wasm::Linker linker { parse_result.value() };
for (auto& instance : linked_instances)
linker.link(instance);
linker.link(*instance);
if (export_all_imports) {
HashMap<Wasm::Linker::Name, Wasm::ExternValue> exports;