diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-02 15:47:44 -0500 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-02 15:49:18 -0500 |
| commit | bcc6100941117dc84fb9ece3812da340d96c61a6 (patch) | |
| tree | d27a97e5a4a8cfa6bfdb3688c2be0183f69e3fbd /src/CompilerKit/ErrorOr.h | |
| parent | f7930b3a1279922cf9e6e75e651fe9b5df247bc6 (diff) | |
chore! reworked source code to exclude `Bool`, `Boolean`, and `nullPtr` macros.
fix: ErrorOr: Return `Ref<T>&` when using Leak.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/CompilerKit/ErrorOr.h')
| -rw-r--r-- | src/CompilerKit/ErrorOr.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CompilerKit/ErrorOr.h b/src/CompilerKit/ErrorOr.h index 9e1e801..9ab86fb 100644 --- a/src/CompilerKit/ErrorOr.h +++ b/src/CompilerKit/ErrorOr.h @@ -30,17 +30,17 @@ class ErrorOr final { public: explicit ErrorOr(ErrorT err) : mId(err) {} - explicit ErrorOr(nullPtr null) {} + explicit ErrorOr(std::nullptr_t null) {} explicit ErrorOr(T klass) : mRef(klass) {} ErrorOr& operator=(const ErrorOr&) = default; ErrorOr(const ErrorOr&) = default; - Ref<T> Leak() { return mRef; } + Ref<T>& Leak() { return mRef; } ErrorT Error() { return mId; } - Bool HasError() { return mId != NECTI_SUCCESS; } + bool HasError() { return mId != NECTI_SUCCESS; } explicit operator bool() { return mRef; } |
