diff --git a/src/nostalgia/core/media.hpp b/src/nostalgia/core/media.hpp index 6721c4d9..825a013f 100644 --- a/src/nostalgia/core/media.hpp +++ b/src/nostalgia/core/media.hpp @@ -25,22 +25,22 @@ ox::Result> readObj(Context *ctx, const ox::FileAddress &file, bool } oxReturnError(convert(buff, &obj)); } - return obj; + return std::move(obj); }; oxRequire(path, file.getPath()); if (forceLoad) { oxRequire(buff, ctx->rom->read(file)); oxRequire(obj, readConvert(buff)); - oxRequire(cached, ctx->assetManager.template setAsset(path, obj)); - return cached; + oxRequire(cached, ctx->assetManager.setAsset(path, obj)); + return std::move(cached); } else { - auto [cached, err] = ctx->assetManager.template getAsset(path); + auto [cached, err] = ctx->assetManager.getAsset(path); if (err) { oxRequire(buff, ctx->rom->read(file)); oxRequire(obj, readConvert(buff)); - oxReturnError(ctx->assetManager.template setAsset(path, obj).moveTo(&cached)); + oxReturnError(ctx->assetManager.setAsset(path, obj).moveTo(&cached)); } - return cached; + return std::move(cached); } #else return OxError(1);