[ox] Rename ValErr to Result

This commit is contained in:
2020-10-16 19:43:10 -05:00
parent faadcae7e9
commit 6b720042d0
23 changed files with 68 additions and 68 deletions

View File

@ -57,18 +57,18 @@ constexpr Error _error(const char *file, uint32_t line, uint64_t errCode, const
}
template<typename T>
struct [[nodiscard]] ValErr {
struct [[nodiscard]] Result {
T value;
Error error;
constexpr ValErr() noexcept: error(0) {
constexpr Result() noexcept: error(0) {
}
constexpr ValErr(Error error) noexcept: value(ox::move(value)), error(error) {
constexpr Result(Error error) noexcept: value(ox::move(value)), error(error) {
this->error = error;
}
constexpr ValErr(T value, Error error = OxError(0)) noexcept: value(ox::move(value)), error(error) {
constexpr Result(T value, Error error = OxError(0)) noexcept: value(ox::move(value)), error(error) {
}
explicit constexpr operator const T&() const noexcept {
@ -97,7 +97,7 @@ constexpr Error toError(ox::Error e) noexcept {
}
template<typename T>
constexpr Error toError(const ox::ValErr<T> &ve) noexcept {
constexpr Error toError(const ox::Result<T> &ve) noexcept {
return ve.error;
}