AK: Remove the fallible constructor from FixedMemoryStream

This commit is contained in:
Tim Schumacher 2023-01-30 11:05:43 +01:00 committed by Linus Groh
commit 220fbcaa7e
Notes: sideshowbarker 2024-07-17 08:55:54 +09:00
31 changed files with 185 additions and 209 deletions

View file

@ -14,10 +14,10 @@ namespace Debug::Dwarf::Expression {
ErrorOr<Value> evaluate(ReadonlyBytes bytes, [[maybe_unused]] PtraceRegisters const& regs)
{
auto stream = TRY(FixedMemoryStream::construct(bytes));
FixedMemoryStream stream { bytes };
while (!stream->is_eof()) {
auto opcode = TRY(stream->read_value<u8>());
while (!stream.is_eof()) {
auto opcode = TRY(stream.read_value<u8>());
switch (static_cast<Operations>(opcode)) {