From a15ed8743d03c6c683f19447be20ca7dac768485 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 10 Nov 2021 14:33:44 +0100 Subject: AK: Make ByteBuffer::try_* functions return ErrorOr 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. --- Userland/Applications/Debugger/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Applications') diff --git a/Userland/Applications/Debugger/main.cpp b/Userland/Applications/Debugger/main.cpp index ec3d4c4efd..9751c28df2 100644 --- a/Userland/Applications/Debugger/main.cpp +++ b/Userland/Applications/Debugger/main.cpp @@ -67,7 +67,7 @@ static bool handle_disassemble_command(const String& command, void* first_instru auto value = g_debug_session->peek(reinterpret_cast(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; } -- cgit v1.2.3