[keel,nostalgia/core] Remove implicit String::String(String const&) calls
This commit is contained in:
parent
91fd0d0786
commit
742427584a
@ -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<ox::StringView, 2>{path, f}));
|
||||
oxRequireM(filePath, ox::join("/", ox::Array<ox::StringView, 2>{path, f}));
|
||||
oxRequire(stat, ctx.rom->stat(filePath));
|
||||
if (stat.fileType == ox::FileType::NormalFile) {
|
||||
oxRequire(data, ctx.rom->read(filePath));
|
||||
|
@ -91,7 +91,7 @@ ox::Result<keel::AssetRef<T>> 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;
|
||||
|
||||
|
@ -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<TileSheet>(ctx->keelCtx, m_path));
|
||||
m_img = *img;
|
||||
if (m_img.defaultPalette) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user