[nostalgia] Rename ValErr to Result
This commit is contained in:
parent
6b720042d0
commit
5587ecf5e5
@ -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;
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user