From 99a20e4d1c6659b725d1abe373acd565afc5174f Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 26 Oct 2012 07:33:50 -0700 Subject: [PATCH] Move InvalidMarginIdError to ass_dialogue.h --- aegisub/src/ass_dialogue.cpp | 4 ++-- aegisub/src/ass_dialogue.h | 8 ++++++++ aegisub/src/ass_entry.h | 26 -------------------------- 3 files changed, 10 insertions(+), 28 deletions(-) diff --git a/aegisub/src/ass_dialogue.cpp b/aegisub/src/ass_dialogue.cpp index d951feb0e..dc6502299 100644 --- a/aegisub/src/ass_dialogue.cpp +++ b/aegisub/src/ass_dialogue.cpp @@ -319,7 +319,7 @@ void AssDialogue::UpdateText () { } void AssDialogue::SetMarginString(wxString const& origvalue, int which) { - if (which < 0 || which > 2) throw Aegisub::InvalidMarginIdError(); + if (which < 0 || which > 2) throw InvalidMarginIdError(); // Make it numeric wxString strvalue = origvalue; @@ -339,7 +339,7 @@ void AssDialogue::SetMarginString(wxString const& origvalue, int which) { } wxString AssDialogue::GetMarginString(int which, bool pad) const { - if (which < 0 || which > 2) throw Aegisub::InvalidMarginIdError(); + if (which < 0 || which > 2) throw InvalidMarginIdError(); return wxString::Format(pad ? "%04d" : "%d", Margin[which]); } diff --git a/aegisub/src/ass_dialogue.h b/aegisub/src/ass_dialogue.h index 01902bb2f..b5e8c7866 100644 --- a/aegisub/src/ass_dialogue.h +++ b/aegisub/src/ass_dialogue.h @@ -39,6 +39,8 @@ #include "ass_entry.h" #include "ass_time.h" +#include + enum AssBlockType { BLOCK_BASE, BLOCK_PLAIN, @@ -196,3 +198,9 @@ public: AssDialogue(wxString const& data); ~AssDialogue(); }; + +class InvalidMarginIdError : public agi::InternalError { +public: + InvalidMarginIdError() : InternalError("Invalid margin id", 0) { } + const char *GetName() const { return "internal_error/invalid_margin_id"; } +}; diff --git a/aegisub/src/ass_entry.h b/aegisub/src/ass_entry.h index 83ef4b166..51ae4ecb4 100644 --- a/aegisub/src/ass_entry.h +++ b/aegisub/src/ass_entry.h @@ -39,12 +39,6 @@ #include #endif -#include - -class AssDialogue; -class AssStyle; -class AssAttachment; - enum AssEntryType { ENTRY_BASE, ENTRY_DIALOGUE, @@ -52,26 +46,6 @@ enum AssEntryType { ENTRY_ATTACHMENT }; -/// @see aegisub.h -namespace Aegisub { - - /// DOCME - /// @class InvalidMarginIdError - /// @brief DOCME - /// - /// DOCME - class InvalidMarginIdError : public agi::InternalError { - public: - InvalidMarginIdError() : InternalError("Invalid margin id", 0) { } - const char *GetName() const { return "internal_error/invalid_margin_id"; } - }; -} - -/// DOCME -/// @class AssEntry -/// @brief DOCME -/// -/// DOCME class AssEntry { /// Raw data, exactly the same line that appears on the .ass (note that this will be in ass even if source wasn't) wxString data;