mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 18:15:58 +00:00
AK: Make ErrorOr::error() const and return a const reference
This commit is contained in:
parent
6900c4fe29
commit
42518867d7
|
@ -139,7 +139,7 @@ public:
|
|||
ErrorOr& operator=(ErrorOr&& 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(); }
|
||||
ErrorType release_error() { return m_error.release_value(); }
|
||||
void release_value() { }
|
||||
|
|
Loading…
Reference in a new issue