From a0c8146396a9e9c0dc48a2564f4e9870a212ed59 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 29 Dec 2023 00:06:18 -0600 Subject: [PATCH] [nostalgia/core/studio] East const some function args --- .../tilesheeteditor/tilesheeteditormodel.cpp | 4 ++-- .../tilesheeteditor/tilesheeteditormodel.hpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditormodel.cpp b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditormodel.cpp index 998c25e9..51d1e2cd 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditormodel.cpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditormodel.cpp @@ -147,7 +147,7 @@ void TileSheetEditorModel::deleteTiles(TileSheet::SubSheetIdx const&idx, std::si pushCommand(ox::make(m_img, idx, tileIdx, tileCnt)); } -ox::Error TileSheetEditorModel::updateSubsheet(TileSheet::SubSheetIdx const&idx, const ox::StringView &name, int cols, int rows) noexcept { +ox::Error TileSheetEditorModel::updateSubsheet(TileSheet::SubSheetIdx const&idx, ox::StringView const&name, int cols, int rows) noexcept { pushCommand(ox::make(m_img, idx, ox::String(name), cols, rows)); return {}; } @@ -239,7 +239,7 @@ void TileSheetEditorModel::ackUpdate() noexcept { ox::Error TileSheetEditorModel::saveFile() noexcept { const auto sctx = applicationData(m_ctx); - return sctx->project->writeObj(m_path, m_img); + return sctx->project->writeObj(m_path, m_img, ox::ClawFormat::Metal); } bool TileSheetEditorModel::pixelSelected(std::size_t idx) const noexcept { diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditormodel.hpp b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditormodel.hpp index cb4162c9..6975926a 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditormodel.hpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditormodel.hpp @@ -61,21 +61,21 @@ class TileSheetEditorModel: public ox::SignalHandler { ox::Error setPalette(ox::StringView path) noexcept; - void drawCommand(const ox::Point &pt, std::size_t palIdx) noexcept; + void drawCommand(ox::Point const&pt, std::size_t palIdx) noexcept; void endDrawCommand() noexcept; - void addSubsheet(const TileSheet::SubSheetIdx &parentIdx) noexcept; + void addSubsheet(TileSheet::SubSheetIdx const&parentIdx) noexcept; - void rmSubsheet(const TileSheet::SubSheetIdx &idx) noexcept; + void rmSubsheet(TileSheet::SubSheetIdx const&idx) noexcept; - void insertTiles(const TileSheet::SubSheetIdx &idx, std::size_t tileIdx, std::size_t tileCnt) noexcept; + void insertTiles(TileSheet::SubSheetIdx const&idx, std::size_t tileIdx, std::size_t tileCnt) noexcept; - void deleteTiles(const TileSheet::SubSheetIdx &idx, std::size_t tileIdx, std::size_t tileCnt) noexcept; + void deleteTiles(TileSheet::SubSheetIdx const&idx, std::size_t tileIdx, std::size_t tileCnt) noexcept; - ox::Error updateSubsheet(const TileSheet::SubSheetIdx &idx, const ox::StringView &name, int cols, int rows) noexcept; + ox::Error updateSubsheet(TileSheet::SubSheetIdx const&idx, ox::StringView const&name, int cols, int rows) noexcept; - void setActiveSubsheet(const TileSheet::SubSheetIdx&) noexcept; + void setActiveSubsheet(TileSheet::SubSheetIdx const&) noexcept; [[nodiscard]] const TileSheet::SubSheet *activeSubSheet() const noexcept {