summaryrefslogtreecommitdiff
path: root/AK/StringBuilder.h
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 /AK/StringBuilder.h
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 'AK/StringBuilder.h')
-rw-r--r--AK/StringBuilder.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/StringBuilder.h b/AK/StringBuilder.h
index bc29e12f06..fc7f830dc4 100644
--- a/AK/StringBuilder.h
+++ b/AK/StringBuilder.h
@@ -64,7 +64,7 @@ public:
}
private:
- bool will_append(size_t);
+ ErrorOr<void> will_append(size_t);
u8* data() { return m_buffer.data(); }
u8 const* data() const { return m_buffer.data(); }