From 2167a4626626ed1480cfcc8e5c3c5855a3252556 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 14 Dec 2023 19:36:58 -0600 Subject: [PATCH] [olympic/studio] Make copy/cut/paste enabled function noexcept --- src/olympic/studio/modlib/include/studio/editor.hpp | 6 +++--- src/olympic/studio/modlib/src/editor.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/olympic/studio/modlib/include/studio/editor.hpp b/src/olympic/studio/modlib/include/studio/editor.hpp index 6d8702d6..55e40613 100644 --- a/src/olympic/studio/modlib/include/studio/editor.hpp +++ b/src/olympic/studio/modlib/include/studio/editor.hpp @@ -76,17 +76,17 @@ class BaseEditor: public Widget { void setCutEnabled(bool); [[nodiscard]] - bool cutEnabled() const; + bool cutEnabled() const noexcept; void setCopyEnabled(bool); [[nodiscard]] - bool copyEnabled() const; + bool copyEnabled() const noexcept; void setPasteEnabled(bool); [[nodiscard]] - bool pasteEnabled() const; + bool pasteEnabled() const noexcept; protected: /** diff --git a/src/olympic/studio/modlib/src/editor.cpp b/src/olympic/studio/modlib/src/editor.cpp index fc777c0f..74a643cf 100644 --- a/src/olympic/studio/modlib/src/editor.cpp +++ b/src/olympic/studio/modlib/src/editor.cpp @@ -54,8 +54,8 @@ void BaseEditor::save() noexcept { } void BaseEditor::setUnsavedChanges(bool uc) { - m_unsavedChanges = uc; - unsavedChangesChanged.emit(uc); + m_unsavedChanges = uc; + unsavedChangesChanged.emit(uc); } bool BaseEditor::unsavedChanges() const noexcept { @@ -76,7 +76,7 @@ void BaseEditor::setCutEnabled(bool v) { cutEnabledChanged.emit(v); } -bool BaseEditor::cutEnabled() const { +bool BaseEditor::cutEnabled() const noexcept { return m_cutEnabled; } @@ -85,7 +85,7 @@ void BaseEditor::setCopyEnabled(bool v) { copyEnabledChanged.emit(v); } -bool BaseEditor::copyEnabled() const { +bool BaseEditor::copyEnabled() const noexcept { return m_copyEnabled; } @@ -94,12 +94,12 @@ void BaseEditor::setPasteEnabled(bool v) { pasteEnabledChanged.emit(v); } -bool BaseEditor::pasteEnabled() const { +bool BaseEditor::pasteEnabled() const noexcept { return m_pasteEnabled; } ox::Error BaseEditor::saveItem() noexcept { - return OxError(0); + return {}; } UndoStack *BaseEditor::undoStack() noexcept {