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.
This commit is contained in:
Niels Martin Hansen 2010-06-24 06:13:06 +00:00
parent 8e912e3ff6
commit 7521d2d29d
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -96,7 +96,7 @@ public:
/// @brief DOCME
///
ASS_EntryType GetType() { return ENTRY_ATTACHMENT; }
AssEntry *Clone();
AssEntry *Clone() const;
AssAttachment(wxString name);
~AssAttachment();