diff --git a/src/keel/media.cpp b/src/keel/media.cpp index 49263286..8d202cc3 100644 --- a/src/keel/media.cpp +++ b/src/keel/media.cpp @@ -46,7 +46,7 @@ static void clearUuidMap(Context &ctx) noexcept { ctx.pathToUuid.clear(); } -void createUuidMapping(Context &ctx, ox::String filePath, ox::UUID const&uuid) noexcept { +void createUuidMapping(Context &ctx, ox::StringView filePath, ox::UUID const&uuid) noexcept { ctx.pathToUuid[filePath] = uuid; ctx.uuidToPath[uuid.toString()] = std::move(filePath); } @@ -54,7 +54,7 @@ void createUuidMapping(Context &ctx, ox::String filePath, ox::UUID const&uuid) n static ox::Error buildUuidMap(Context &ctx, ox::CRStringView path) noexcept { oxRequire(files, ctx.rom->ls(path)); for (const auto &f : files) { - oxRequire(filePath, ox::join("/", ox::Array{path, f})); + oxRequireM(filePath, ox::join("/", ox::Array{path, f})); oxRequire(stat, ctx.rom->stat(filePath)); if (stat.fileType == ox::FileType::NormalFile) { oxRequire(data, ctx.rom->read(filePath)); diff --git a/src/keel/media.hpp b/src/keel/media.hpp index 345e2cda..bd6ae6f4 100644 --- a/src/keel/media.hpp +++ b/src/keel/media.hpp @@ -91,7 +91,7 @@ ox::Result> readObjNoCache( #endif -void createUuidMapping(Context &ctx, ox::String filePath, ox::UUID const&uuid) noexcept; +void createUuidMapping(Context &ctx, ox::StringView filePath, ox::UUID const&uuid) noexcept; ox::Error buildUuidMap(Context &ctx) noexcept; diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditormodel.cpp b/src/nostalgia/modules/core/src/studio/tilesheeteditormodel.cpp index c0852cfb..7deade63 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditormodel.cpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditormodel.cpp @@ -563,9 +563,9 @@ class PaletteChangeCommand: public TileSheetCommand { }; -TileSheetEditorModel::TileSheetEditorModel(turbine::Context *ctx, ox::String path): +TileSheetEditorModel::TileSheetEditorModel(turbine::Context *ctx, ox::StringView path): m_ctx(ctx), - m_path(std::move(path)) { + m_path(path) { oxRequireT(img, readObj(ctx->keelCtx, m_path)); m_img = *img; if (m_img.defaultPalette) { diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditormodel.hpp b/src/nostalgia/modules/core/src/studio/tilesheeteditormodel.hpp index 6acca3f5..5fc3009f 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditormodel.hpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditormodel.hpp @@ -36,7 +36,7 @@ class TileSheetEditorModel: public ox::SignalHandler { ox::Bounds m_selectionBounds = {{-1, -1}, {-1, -1}}; public: - TileSheetEditorModel(turbine::Context *ctx, ox::String path); + TileSheetEditorModel(turbine::Context *ctx, ox::StringView path); ~TileSheetEditorModel() override = default; diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditorview.cpp b/src/nostalgia/modules/core/src/studio/tilesheeteditorview.cpp index adaa3765..a4da5243 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditorview.cpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditorview.cpp @@ -11,8 +11,8 @@ namespace nostalgia::core { -TileSheetEditorView::TileSheetEditorView(turbine::Context *ctx, ox::String path): - m_model(ctx, std::move(path)), m_pixelsDrawer(&m_model) { +TileSheetEditorView::TileSheetEditorView(turbine::Context *ctx, ox::StringView path): + m_model(ctx, path), m_pixelsDrawer(&m_model) { // build shaders oxThrowError(m_pixelsDrawer.buildShader()); oxThrowError(m_pixelGridDrawer.buildShader()); diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditorview.hpp b/src/nostalgia/modules/core/src/studio/tilesheeteditorview.hpp index b0857826..4a555125 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditorview.hpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditorview.hpp @@ -50,7 +50,7 @@ class TileSheetEditorView: public ox::SignalHandler { std::size_t m_palIdx = 0; public: - TileSheetEditorView(turbine::Context *ctx, ox::String path); + TileSheetEditorView(turbine::Context *ctx, ox::StringView path); ~TileSheetEditorView() override = default;