From 5587ecf5e539036bc4e7b229087ee110ce7c00e0 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 16 Oct 2020 19:43:17 -0500 Subject: [PATCH] [nostalgia] Rename ValErr to Result --- src/nostalgia/core/sdl/gfx.cpp | 4 ++-- src/nostalgia/core/studio/imgconv.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nostalgia/core/sdl/gfx.cpp b/src/nostalgia/core/sdl/gfx.cpp index 65105700..d5357608 100644 --- a/src/nostalgia/core/sdl/gfx.cpp +++ b/src/nostalgia/core/sdl/gfx.cpp @@ -33,7 +33,7 @@ struct SdlImplData { constexpr auto Scale = 5; -static ox::ValErr> readFile(Context *ctx, const ox::FileAddress &file) { +static ox::Result> readFile(Context *ctx, const ox::FileAddress &file) { auto [stat, err] = ctx->rom->stat(file); oxReturnError(err); ox::Vector buff(stat.size); @@ -42,7 +42,7 @@ static ox::ValErr> readFile(Context *ctx, const ox::FileAddress } template -ox::ValErr readObj(Context *ctx, const ox::FileAddress &file) { +ox::Result readObj(Context *ctx, const ox::FileAddress &file) { auto [buff, err] = readFile(ctx, file); oxReturnError(err); T t; diff --git a/src/nostalgia/core/studio/imgconv.hpp b/src/nostalgia/core/studio/imgconv.hpp index 06935f19..3c3f85b7 100644 --- a/src/nostalgia/core/studio/imgconv.hpp +++ b/src/nostalgia/core/studio/imgconv.hpp @@ -18,7 +18,7 @@ namespace nostalgia::core { template -ox::ValErr> toBuffer(T *data, std::size_t buffSize = ox::units::MB) { +ox::Result> toBuffer(T *data, std::size_t buffSize = ox::units::MB) { std::vector buff(buffSize); std::size_t sz = 0; oxReturnError(ox::writeMC(buff.data(), buff.size(), data, &sz));