mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +00:00
AK: Make ByteBuffer::try_* functions return ErrorOr<void>
Same as Vector, ByteBuffer now also signals allocation failure by returning an ENOMEM Error instead of a bool, allowing us to use the TRY() and MUST() patterns.
This commit is contained in:
parent
88b6428c25
commit
a15ed8743d
20 changed files with 59 additions and 70 deletions
|
@ -67,7 +67,7 @@ static bool handle_disassemble_command(const String& command, void* first_instru
|
|||
auto value = g_debug_session->peek(reinterpret_cast<u32*>(first_instruction) + i);
|
||||
if (!value.has_value())
|
||||
break;
|
||||
if (!code.try_append(&value, sizeof(u32)))
|
||||
if (code.try_append(&value, sizeof(u32)).is_error())
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue