[nostalgia] Rename ValErr to Result

This commit is contained in:
Gary Talent 2020-10-16 19:43:17 -05:00
parent 6b720042d0
commit 5587ecf5e5
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ struct SdlImplData {
constexpr auto Scale = 5;
static ox::ValErr<ox::Vector<char>> readFile(Context *ctx, const ox::FileAddress &file) {
static ox::Result<ox::Vector<char>> readFile(Context *ctx, const ox::FileAddress &file) {
auto [stat, err] = ctx->rom->stat(file);
oxReturnError(err);
ox::Vector<char> buff(stat.size);
@ -42,7 +42,7 @@ static ox::ValErr<ox::Vector<char>> readFile(Context *ctx, const ox::FileAddress
}
template<typename T>
ox::ValErr<T> readObj(Context *ctx, const ox::FileAddress &file) {
ox::Result<T> readObj(Context *ctx, const ox::FileAddress &file) {
auto [buff, err] = readFile(ctx, file);
oxReturnError(err);
T t;

View File

@ -18,7 +18,7 @@
namespace nostalgia::core {
template<typename T>
ox::ValErr<std::vector<uint8_t>> toBuffer(T *data, std::size_t buffSize = ox::units::MB) {
ox::Result<std::vector<uint8_t>> toBuffer(T *data, std::size_t buffSize = ox::units::MB) {
std::vector<uint8_t> buff(buffSize);
std::size_t sz = 0;
oxReturnError(ox::writeMC(buff.data(), buff.size(), data, &sz));