mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 09:20:28 +03: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
Notes:
sideshowbarker
2024-07-17 23:07:59 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/6f37510a710 Pull-request: https://github.com/SerenityOS/serenity/pull/11113 Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/creator1creeper1
@ -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 New Issue
Block a user