[keel,nostalgia,studio] Make keel use references in place of a lot of pointers

This commit is contained in:
2023-11-30 23:11:49 -06:00
parent 95ba8eb138
commit 232a166833
22 changed files with 162 additions and 160 deletions

View File

@@ -56,7 +56,7 @@ static ox::Result<std::size_t> findPreloadSection() noexcept {
ox::Result<ox::UniquePtr<turbine::Context>> init(ox::UPtr<ox::FileSystem> fs, ox::CRStringView appName) noexcept {
auto ctx = ox::make_unique<gba::Context>();
oxReturnError(keel::init(&ctx->keelCtx, std::move(fs), appName));
oxReturnError(keel::init(ctx->keelCtx, std::move(fs), appName));
#ifdef OX_BARE_METAL
oxReturnError(findPreloadSection().moveTo(&ctx->keelCtx.preloadSectionOffset));
#endif

View File

@@ -39,7 +39,7 @@ static void draw(GLFWwindow *window, int, int) noexcept {
ox::Result<ox::UPtr<Context>> init(ox::UPtr<ox::FileSystem> fs, ox::CRStringView appName) noexcept {
auto ctx = ox::make_unique<GlfwContext>();
oxReturnError(keel::init(&ctx->keelCtx, std::move(fs), appName));
oxReturnError(keel::init(ctx->keelCtx, std::move(fs), appName));
using namespace std::chrono;
ctx->startTime = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
glfwInit();