lib/error: Remove ErrorOr<T>(bool) constructor

This allows ErrorOr<T> to be used for bool, as there would be conflicting
constructors otherwise.

Also, we have ErrorCodes::UNKNOWN now so, instead of `ErrorOr<T>(true)`,
`ErrorOr<T>(true, ErrorCodes::UNKNOWN)` can be used.
BodgeMaster-unfinished
BodgeMaster 2022-07-14 03:58:13 +02:00
parent e6f4884b60
commit a2084e296a
1 changed files with 0 additions and 7 deletions

View File

@ -25,7 +25,6 @@ struct ErrorOr {
ErrorOr<T>();
ErrorOr<T>(T);
ErrorOr<T>(bool);
ErrorOr<T>(bool, uint8_t);
ErrorOr<T>(bool, uint8_t, T);
};
@ -43,12 +42,6 @@ ErrorOr<T>::ErrorOr(T value) {
this->value = value;
}
template <typename T>
ErrorOr<T>::ErrorOr(bool isError) {
this->isError = isError;
this->errorCode = 0;
}
template <typename T>
ErrorOr<T>::ErrorOr(bool isError, uint8_t errorCode) {
this->isError = isError;