From 7521d2d29dbe77228fff247e4a5f34a0cb069be6 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Thu, 24 Jun 2010 06:13:06 +0000 Subject: [PATCH] Fix AssAttachment::Clone() not being const causing it to not override AssEntry::Clone(), and make sure the group field is also copied during cloning. Updates #1216. Originally committed to SVN as r4589. --- aegisub/src/ass_attachment.cpp | 3 ++- aegisub/src/ass_attachment.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/aegisub/src/ass_attachment.cpp b/aegisub/src/ass_attachment.cpp index 10d8684ef..8a0820ed0 100644 --- a/aegisub/src/ass_attachment.cpp +++ b/aegisub/src/ass_attachment.cpp @@ -79,12 +79,13 @@ AssAttachment::~AssAttachment() { /// @brief Clone /// @return /// -AssEntry *AssAttachment::Clone() { +AssEntry *AssAttachment::Clone() const { // New object AssAttachment *clone = new AssAttachment(filename); // Copy fields clone->data = data; + clone->group = group; // Return return clone; diff --git a/aegisub/src/ass_attachment.h b/aegisub/src/ass_attachment.h index c9411fa3b..cc3109139 100644 --- a/aegisub/src/ass_attachment.h +++ b/aegisub/src/ass_attachment.h @@ -96,7 +96,7 @@ public: /// @brief DOCME /// ASS_EntryType GetType() { return ENTRY_ATTACHMENT; } - AssEntry *Clone(); + AssEntry *Clone() const; AssAttachment(wxString name); ~AssAttachment();