[keel] Cleanup string handling
This commit is contained in:
parent
5cbf789374
commit
ce514d586c
@ -178,9 +178,8 @@ ox::Error setRomFs(Context &ctx, ox::UPtr<ox::FileSystem> fs) noexcept {
|
||||
}
|
||||
|
||||
ox::Result<ox::UniquePtr<ox::FileSystem>> loadRomFs(ox::CRStringView path) noexcept {
|
||||
const auto lastDot = ox_lastIndexOf(path, '.');
|
||||
const auto fsExt = lastDot != -1 ? substr(path, static_cast<std::size_t>(lastDot)) : "";
|
||||
if (ox_strcmp(fsExt, ".oxfs") == 0) {
|
||||
auto const lastDot = ox::lastIndexOf(path, '.');
|
||||
if (!lastDot.error && substr(path, lastDot.value) == ".oxfs") {
|
||||
oxRequire(rom, loadRom(path));
|
||||
return {ox::make_unique<ox::FileSystem32>(rom, 32 * ox::units::MB, unloadRom)};
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user