[keel,nostalgia,studio] Make keel use references in place of a lot of pointers
This commit is contained in:
@@ -303,7 +303,7 @@ void StudioUI::save() noexcept {
|
||||
|
||||
ox::Error StudioUI::openProject(ox::CRStringView path) noexcept {
|
||||
oxRequireM(fs, keel::loadRomFs(path));
|
||||
oxReturnError(keel::setRomFs(&m_ctx->keelCtx, std::move(fs)));
|
||||
oxReturnError(keel::setRomFs(m_ctx->keelCtx, std::move(fs)));
|
||||
turbine::setWindowTitle(*m_ctx, ox::sfmt("{} - {}", m_ctx->keelCtx.appName, path));
|
||||
m_project = ox::make_unique<studio::Project>(m_ctx->keelCtx, ox::String(path), m_projectDir);
|
||||
auto sctx = applicationData<studio::StudioContext>(*m_ctx);
|
||||
|
@@ -64,7 +64,7 @@ class ItemMakerT: public ItemMaker {
|
||||
ox::Error write(turbine::Context *ctx, ox::CRStringView pName) const noexcept override {
|
||||
const auto path = ox::sfmt("/{}/{}.{}", parentDir, pName, fileExt);
|
||||
auto sctx = turbine::applicationData<studio::StudioContext>(*ctx);
|
||||
keel::createUuidMapping(&ctx->keelCtx, path, ox::UUID::generate().unwrap());
|
||||
keel::createUuidMapping(ctx->keelCtx, path, ox::UUID::generate().unwrap());
|
||||
return sctx->project->writeObj(path, item, fmt);
|
||||
}
|
||||
};
|
||||
|
@@ -125,7 +125,7 @@ ox::Error Project::writeObj(ox::CRStringView path, T const&obj, ox::ClawFormat f
|
||||
const auto typePath = ox::sfmt("/{}/{}", descPath, buildTypeId(*t));
|
||||
oxReturnError(writeBuff(typePath, typeOut));
|
||||
}
|
||||
oxReturnError(keel::setAsset(&m_ctx, path, obj));
|
||||
oxReturnError(keel::setAsset(m_ctx, path, obj));
|
||||
fileUpdated.emit(path);
|
||||
return {};
|
||||
}
|
||||
|
Reference in New Issue
Block a user