From 2062748676dc88dd91b74620397f730df0a6b95b Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 3 Oct 2024 22:38:48 -0500 Subject: [PATCH] [keel] Cleanup --- src/olympic/keel/include/keel/media.hpp | 4 ++-- src/olympic/keel/src/media.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/olympic/keel/include/keel/media.hpp b/src/olympic/keel/include/keel/media.hpp index 800c3461..728ee973 100644 --- a/src/olympic/keel/include/keel/media.hpp +++ b/src/olympic/keel/include/keel/media.hpp @@ -29,8 +29,8 @@ oxModelBegin(PreloadPtr) oxModelField(preloadAddr) oxModelEnd() -ox::Result getPreloadAddr(keel::Context &ctx, ox::FileAddress const&file) noexcept; -ox::Result getPreloadAddr(keel::Context &ctx, ox::StringViewCR file) noexcept; +ox::Result getPreloadAddr(keel::Context &ctx, ox::FileAddress const&addr) noexcept; +ox::Result getPreloadAddr(keel::Context &ctx, ox::StringViewCR path) noexcept; void createUuidMapping(Context &ctx, ox::StringView filePath, ox::UUID const&uuid) noexcept; diff --git a/src/olympic/keel/src/media.cpp b/src/olympic/keel/src/media.cpp index 7f2b7cbc..857e9a5e 100644 --- a/src/olympic/keel/src/media.cpp +++ b/src/olympic/keel/src/media.cpp @@ -208,15 +208,15 @@ void unloadRom(char*) noexcept { ox::Result getPreloadAddr(keel::Context &ctx, ox::StringViewCR path) noexcept { oxRequire(stat, ctx.rom->stat(path)); - oxRequire(buff, static_cast(ctx.rom.get())->directAccess(path)); + oxRequire(buff, static_cast(*ctx.rom).directAccess(path)); PreloadPtr p; oxReturnError(ox::readMC({buff, static_cast(stat.size)}, p)); return static_cast(p.preloadAddr) + ctx.preloadSectionOffset; } -ox::Result getPreloadAddr(keel::Context &ctx, ox::FileAddress const&file) noexcept { - oxRequire(stat, ctx.rom->stat(file)); - oxRequire(buff, static_cast(ctx.rom.get())->directAccess(file)); +ox::Result getPreloadAddr(keel::Context &ctx, ox::FileAddress const&addr) noexcept { + oxRequire(stat, ctx.rom->stat(addr)); + oxRequire(buff, static_cast(*ctx.rom).directAccess(addr)); PreloadPtr p; oxReturnError(ox::readMC({buff, static_cast(stat.size)}, p)); return static_cast(p.preloadAddr) + ctx.preloadSectionOffset;