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:
parent
8e912e3ff6
commit
7521d2d29d
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
/// @brief DOCME
|
||||
///
|
||||
ASS_EntryType GetType() { return ENTRY_ATTACHMENT; }
|
||||
AssEntry *Clone();
|
||||
AssEntry *Clone() const;
|
||||
|
||||
AssAttachment(wxString name);
|
||||
~AssAttachment();
|
||||
|
|
Loading…
Reference in a new issue