[nostalgia,studio] Replace some String returns with StringView
This commit is contained in:
@@ -22,11 +22,11 @@ PaletteEditorImGui::PaletteEditorImGui(turbine::Context &ctx, ox::CRStringView p
|
||||
m_pal(*keel::readObj<Palette>(keelCtx(m_ctx), ox::FileAddress(m_itemPath.c_str())).unwrapThrow()) {
|
||||
}
|
||||
|
||||
ox::String const&PaletteEditorImGui::itemName() const noexcept {
|
||||
ox::CStringView PaletteEditorImGui::itemName() const noexcept {
|
||||
return m_itemPath;
|
||||
}
|
||||
|
||||
ox::String const&PaletteEditorImGui::itemDisplayName() const noexcept {
|
||||
ox::CStringView PaletteEditorImGui::itemDisplayName() const noexcept {
|
||||
return m_itemName;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ class PaletteEditorImGui: public studio::Editor {
|
||||
/**
|
||||
* Returns the name of item being edited.
|
||||
*/
|
||||
ox::String const&itemName() const noexcept final;
|
||||
ox::CStringView itemName() const noexcept final;
|
||||
|
||||
ox::String const&itemDisplayName() const noexcept final;
|
||||
ox::CStringView itemDisplayName() const noexcept final;
|
||||
|
||||
void draw(turbine::Context*) noexcept final;
|
||||
|
||||
|
||||
@@ -54,11 +54,11 @@ TileSheetEditorImGui::TileSheetEditorImGui(turbine::Context &ctx, ox::CRStringVi
|
||||
model()->paletteChanged.connect(this, &TileSheetEditorImGui::setPaletteSelection);
|
||||
}
|
||||
|
||||
ox::String const&TileSheetEditorImGui::itemName() const noexcept {
|
||||
ox::CStringView TileSheetEditorImGui::itemName() const noexcept {
|
||||
return m_itemPath;
|
||||
}
|
||||
|
||||
ox::String const&TileSheetEditorImGui::itemDisplayName() const noexcept {
|
||||
ox::CStringView TileSheetEditorImGui::itemDisplayName() const noexcept {
|
||||
return m_itemName;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,9 @@ class TileSheetEditorImGui: public studio::BaseEditor {
|
||||
|
||||
~TileSheetEditorImGui() override = default;
|
||||
|
||||
ox::String const&itemName() const noexcept override;
|
||||
ox::CStringView itemName() const noexcept override;
|
||||
|
||||
ox::String const&itemDisplayName() const noexcept override;
|
||||
ox::CStringView itemDisplayName() const noexcept override;
|
||||
|
||||
void exportFile() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user