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
parent
e6f4884b60
commit
a2084e296a
|
@ -25,7 +25,6 @@ struct ErrorOr {
|
||||||
|
|
||||||
ErrorOr<T>();
|
ErrorOr<T>();
|
||||||
ErrorOr<T>(T);
|
ErrorOr<T>(T);
|
||||||
ErrorOr<T>(bool);
|
|
||||||
ErrorOr<T>(bool, uint8_t);
|
ErrorOr<T>(bool, uint8_t);
|
||||||
ErrorOr<T>(bool, uint8_t, T);
|
ErrorOr<T>(bool, uint8_t, T);
|
||||||
};
|
};
|
||||||
|
@ -43,12 +42,6 @@ ErrorOr<T>::ErrorOr(T value) {
|
||||||
this->value = value;
|
this->value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
ErrorOr<T>::ErrorOr(bool isError) {
|
|
||||||
this->isError = isError;
|
|
||||||
this->errorCode = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
ErrorOr<T>::ErrorOr(bool isError, uint8_t errorCode) {
|
ErrorOr<T>::ErrorOr(bool isError, uint8_t errorCode) {
|
||||||
this->isError = isError;
|
this->isError = isError;
|
||||||
|
|
Loading…
Reference in New Issue