mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 01:55:07 +00:00
AK: Implement missing const getters in AK::Error, fix typo
Note that the return type for the non-const method error() changed. This is most likely an accident, hidden by the fact that ErrorType typically is Error.
This commit is contained in:
parent
dbd60f9ff4
commit
6f37510a71
|
@ -93,7 +93,9 @@ public:
|
|||
ErrorOr& operator=(ErrorOr const& other) = default;
|
||||
|
||||
T& value() { return m_value.value(); }
|
||||
Error& error() { return m_error.value(); }
|
||||
T const& value() const { return m_value.value(); }
|
||||
ErrorType& error() { return m_error.value(); }
|
||||
ErrorType const& error() const { return m_error.value(); }
|
||||
|
||||
bool is_error() const { return m_error.has_value(); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue