summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-10 14:33:44 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-10 21:58:58 +0100
commita15ed8743d03c6c683f19447be20ca7dac768485 (patch)
treefe3b808b4909686757dae5c4a949ba18fe7e5eba /Userland/Applications
parent88b6428c25ea046a4bb19bb6f3f68dd4f1439539 (diff)
downloadserenity-a15ed8743d03c6c683f19447be20ca7dac768485.zip
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.
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Debugger/main.cpp2
1 files changed, 1 insertions, 1 deletions
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<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;
}