mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
AK: Make ErrorOr::error() const and return a const reference
This commit is contained in:
committed by
Sam Atkins
parent
6900c4fe29
commit
42518867d7
@@ -139,7 +139,7 @@ public:
|
|||||||
ErrorOr& operator=(ErrorOr&& other) = default;
|
ErrorOr& operator=(ErrorOr&& other) = default;
|
||||||
ErrorOr& operator=(ErrorOr const& other) = default;
|
ErrorOr& operator=(ErrorOr const& other) = default;
|
||||||
|
|
||||||
ErrorType& error() { return m_error.value(); }
|
ErrorType const& error() const { return m_error.value(); }
|
||||||
bool is_error() const { return m_error.has_value(); }
|
bool is_error() const { return m_error.has_value(); }
|
||||||
ErrorType release_error() { return m_error.release_value(); }
|
ErrorType release_error() { return m_error.release_value(); }
|
||||||
void release_value() { }
|
void release_value() { }
|
||||||
|
|||||||
Reference in New Issue
Block a user