mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
AK: Move memory streams from LibCore
This commit is contained in:
committed by
Andrew Kaster
parent
11550f582b
commit
093cf428a3
@@ -5,10 +5,10 @@
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/MappedFile.h>
|
||||
#include <LibCore/MemoryStream.h>
|
||||
#include <LibLine/Editor.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <LibWasm/AbstractMachine/AbstractMachine.h>
|
||||
@@ -252,7 +252,7 @@ static Optional<Wasm::Module> parse(StringView filename)
|
||||
return {};
|
||||
}
|
||||
|
||||
auto stream = Core::Stream::FixedMemoryStream::construct(ReadonlyBytes { result.value()->data(), result.value()->size() }).release_value_but_fixme_should_propagate_errors();
|
||||
auto stream = FixedMemoryStream::construct(ReadonlyBytes { result.value()->data(), result.value()->size() }).release_value_but_fixme_should_propagate_errors();
|
||||
auto parse_result = Wasm::Module::parse(*stream);
|
||||
if (parse_result.is_error()) {
|
||||
warnln("Something went wrong, either the file is invalid, or there's a bug with LibWasm!");
|
||||
@@ -398,7 +398,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
StringBuilder argument_builder;
|
||||
bool first = true;
|
||||
for (auto& argument : arguments) {
|
||||
Core::Stream::AllocatingMemoryStream stream;
|
||||
AllocatingMemoryStream stream;
|
||||
Wasm::Printer { stream }.print(argument);
|
||||
if (first)
|
||||
first = false;
|
||||
|
||||
Reference in New Issue
Block a user