BAN: Fix ErrorOr<void> to actually set error byte

This commit is contained in:
Bananymous 2023-02-10 01:06:18 +02:00
parent 7ee4ecd7f4
commit f68ae01d0c
1 changed files with 3 additions and 3 deletions

View File

@ -59,9 +59,9 @@ namespace BAN
class ErrorOr<void>
{
public:
ErrorOr() { }
ErrorOr(const Error& error) : m_error(error) { }
~ErrorOr() { }
ErrorOr() { }
ErrorOr(const Error& error) : m_error(error), m_has_error(true) { }
~ErrorOr() { }
bool is_error() const { return m_has_error; }
const Error& get_error() const { return m_error; }