1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

Kernel: Make DoubleBuffer::try() return KResultOr

This tidies up error propagation in a number of places.
This commit is contained in:
Andreas Kling 2021-09-07 13:46:11 +02:00
parent 213b8868af
commit 01993d0af3
8 changed files with 23 additions and 32 deletions

View file

@ -16,7 +16,7 @@ namespace Kernel {
class DoubleBuffer {
public:
[[nodiscard]] static OwnPtr<DoubleBuffer> try_create(size_t capacity = 65536);
static KResultOr<NonnullOwnPtr<DoubleBuffer>> try_create(size_t capacity = 65536);
KResultOr<size_t> write(const UserOrKernelBuffer&, size_t);
KResultOr<size_t> write(const u8* data, size_t size)
{