diff options
| author | 0xf00sec <159052166+0xf00sec@users.noreply.github.com> | 2025-09-28 15:10:46 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-28 15:10:46 +0300 |
| commit | 2d673e164b98db5eb08d4c41c6225fbe73ee82d7 (patch) | |
| tree | 1dccc97ea6d52012d682f664995959fe7db9ddd1 /dev/kernel | |
| parent | 78bd706f8703d0c5cce7c8a66e4668ed28532e07 (diff) | |
ErrorOr.h: T.Value
Introduced T& Value() to extract the underlying scalar value without implying ownership transfer. Kept Leak() to explicitly indicate heap ownership transfer.
Signed-off-by: 0xf00sec <159052166+0xf00sec@users.noreply.github.com>
Diffstat (limited to 'dev/kernel')
| -rw-r--r-- | dev/kernel/NeKit/ErrorOr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dev/kernel/NeKit/ErrorOr.h b/dev/kernel/NeKit/ErrorOr.h index b653e0ee..52f0d6a9 100644 --- a/dev/kernel/NeKit/ErrorOr.h +++ b/dev/kernel/NeKit/ErrorOr.h @@ -38,6 +38,8 @@ class ErrorOr final { return *this; } + T Value() const { return *mRef; } + Ref<T>& Leak() { return mRef; } Int32 Error() { return mId; } |
