The AssEntry::Clone() function ought to have been const all the time... make it. (Ugh, I had to make a const_cast in AssStyle::Clone().)
Originally committed to SVN as r3028.
This commit is contained in:
parent
1e4ec69f7f
commit
a1677d3a2c
6 changed files with 7 additions and 7 deletions
|
@ -784,7 +784,7 @@ wxString AssDialogue::GetStrippedText() const {
|
|||
}
|
||||
/////////
|
||||
// Clone
|
||||
AssEntry *AssDialogue::Clone() {
|
||||
AssEntry *AssDialogue::Clone() const {
|
||||
// Create clone
|
||||
AssDialogue *final = new AssDialogue();
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ public:
|
|||
wxString GetSSAText();
|
||||
bool CollidesWith(AssDialogue *target); // Checks if two lines collide
|
||||
|
||||
AssEntry *Clone();
|
||||
AssEntry *Clone() const;
|
||||
|
||||
AssDialogue();
|
||||
AssDialogue(wxString data,int version=1);
|
||||
|
|
|
@ -119,7 +119,7 @@ wxString AssEntry::GetSSAText() {
|
|||
|
||||
/////////
|
||||
// Clone
|
||||
AssEntry *AssEntry::Clone() {
|
||||
AssEntry *AssEntry::Clone() const {
|
||||
// Create clone
|
||||
AssEntry *final = new AssEntry();
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
AssEntry(wxString data);
|
||||
virtual ~AssEntry();
|
||||
|
||||
virtual AssEntry *Clone();
|
||||
virtual AssEntry *Clone() const;
|
||||
|
||||
virtual int GetStartMS() const { return StartMS; }
|
||||
virtual int GetEndMS() const { return StartMS; }
|
||||
|
|
|
@ -493,7 +493,7 @@ wxString AssStyle::GetSSAText() {
|
|||
|
||||
/////////
|
||||
// Clone
|
||||
AssEntry *AssStyle::Clone() {
|
||||
AssEntry *AssStyle::Clone() const {
|
||||
// Create clone
|
||||
AssStyle *final = new AssStyle();
|
||||
|
||||
|
@ -526,7 +526,7 @@ AssEntry *AssStyle::Clone() {
|
|||
final->strikeout = strikeout;
|
||||
final->underline = underline;
|
||||
final->relativeTo = relativeTo;
|
||||
final->SetEntryData(GetEntryData());
|
||||
final->SetEntryData(const_cast<AssStyle*>(this)->GetEntryData());
|
||||
|
||||
// Return
|
||||
return final;
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
void SetMarginString(const wxString value,int which); // Sets margin value from a string (0 = left, 1 = right, 2 = vertical/top, 3 = bottom)
|
||||
static void GetEncodings(wxArrayString &encodingStrings);
|
||||
|
||||
AssEntry *Clone();
|
||||
AssEntry *Clone() const;
|
||||
bool IsEqualTo(AssStyle *style);
|
||||
|
||||
AssStyle();
|
||||
|
|
Loading…
Reference in a new issue