From 5a52d322b2beecb8d8cf68e3221ff860260fad3a Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 17 Jul 2021 12:25:47 -0500 Subject: [PATCH] [nostalgia/core/studio] Replace ox::Error catch with ox::Exception catch --- src/nostalgia/core/studio/tilesheeteditor.cpp | 8 ++------ src/nostalgia/core/studio/tilesheeteditor.hpp | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/nostalgia/core/studio/tilesheeteditor.cpp b/src/nostalgia/core/studio/tilesheeteditor.cpp index dbbf6493..768fc204 100644 --- a/src/nostalgia/core/studio/tilesheeteditor.cpp +++ b/src/nostalgia/core/studio/tilesheeteditor.cpp @@ -391,10 +391,6 @@ void TileSheetClipboard::addPixel(int color) { m_pixels.push_back(color); } -void TileSheetClipboard::clear() { - m_pixels.clear(); -} - bool TileSheetClipboard::empty() const { return m_pixels.empty(); } @@ -591,7 +587,7 @@ void SheetData::setPalette(const studio::Context *ctx, QString palPath) { std::unique_ptr npal; try { npal = ctx->project->loadObj(palPath); - } catch (ox::Error) { + } catch (ox::Exception&) { qWarning() << "Could not open palette" << palPath; } if (npal) { @@ -895,7 +891,7 @@ void TileSheetEditor::exportFile() { std::unique_ptr npal; try { npal = m_ctx->project->loadObj(palPath); - } catch (ox::Error) { + } catch (ox::Exception&) { qWarning() << "Could not open palette" << palPath; // TODO: message box to notify of failure } diff --git a/src/nostalgia/core/studio/tilesheeteditor.hpp b/src/nostalgia/core/studio/tilesheeteditor.hpp index cd938efb..db796c46 100644 --- a/src/nostalgia/core/studio/tilesheeteditor.hpp +++ b/src/nostalgia/core/studio/tilesheeteditor.hpp @@ -79,8 +79,6 @@ struct TileSheetClipboard { public: void addPixel(int color); - void clear(); - [[nodiscard]] bool empty() const; void pastePixels(common::Point pt, QVector *tgt, int tgtColumns) const;