[keel,studio] Update for Ox changes

This commit is contained in:
2023-06-08 21:18:30 -05:00
parent 2c8e073172
commit e0289ee7e0
6 changed files with 15 additions and 12 deletions

View File

@ -131,7 +131,7 @@ ox::Error writeObj(
const ox::FileAddress &file,
const T &obj,
ox::ClawFormat fmt = ox::ClawFormat::Metal) noexcept {
oxRequire(objBuff, ox::writeClaw(&obj, fmt));
oxRequire(objBuff, ox::writeClaw(obj, fmt));
return ctx->rom->write(file, objBuff.data(), objBuff.size());
}

View File

@ -87,7 +87,7 @@ static ox::Error doTransformations(keel::Context *ctx, ox::TypeStore *ts, ox::Fi
// transform FileAddresses
oxRequireM(obj, keel::readAsset(ts, buff));
oxReturnError(transformFileAddressesObj(ctx, dest, &obj));
oxReturnError(ox::writeClaw(&obj).moveTo(&buff));
oxReturnError(ox::writeClaw(obj).moveTo(&buff));
// write file to dest
oxReturnError(dest->write(s.inode, buff.data(), buff.size()));
return {};

View File

@ -172,7 +172,7 @@ ox::Result<ox::Buffer> convertBuffToBuff(keel::Context *ctx, const ox::Buffer &s
static constexpr auto DstTypeName = ox::requireModelTypeName<DstType>();
static constexpr auto DstTypeVersion = ox::requireModelTypeVersion<DstType>();
oxRequire(out, convert(ctx, srcBuffer, DstTypeName, DstTypeVersion));
return ox::writeClaw<DstType>(wrapCast<DstType>(out.get()), fmt);
return ox::writeClaw<DstType>(*wrapCast<DstType>(out.get()), fmt);
}
template<typename From, typename To, ox::ClawFormat fmt = ox::ClawFormat::Metal>