mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Make ErrorOr::error() const and return a const reference
This commit is contained in:
parent
6900c4fe29
commit
42518867d7
Notes:
sideshowbarker
2024-07-17 06:34:47 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/42518867d7 Pull-request: https://github.com/SerenityOS/serenity/pull/14296 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/bgianfo
1 changed files with 1 additions and 1 deletions
|
@ -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