diff --git a/aegisub/src/ass_dialogue.cpp b/aegisub/src/ass_dialogue.cpp index 33d969eb5..74c807ba2 100644 --- a/aegisub/src/ass_dialogue.cpp +++ b/aegisub/src/ass_dialogue.cpp @@ -49,21 +49,18 @@ #include "utils.h" AssDialogue::AssDialogue() -: Comment(false) +: AssEntry(wxString(), "[Events]") +, Comment(false) , Layer(0) , Start(0) , End(5000) , Style("Default") -, Actor("") -, Effect("") -, Text("") { - group = "[Events]"; for (int i=0;i<4;i++) Margin[i] = 0; } AssDialogue::AssDialogue(AssDialogue const& that) -: AssEntry() +: AssEntry(wxString(), "[Events]") , Comment(that.Comment) , Layer(that.Layer) , Start(that.Start) @@ -73,7 +70,6 @@ AssDialogue::AssDialogue(AssDialogue const& that) , Effect(that.Effect) , Text(that.Text) { - group = that.group; for (int i=0;i<4;i++) Margin[i] = that.Margin[i]; } @@ -81,16 +77,13 @@ AssDialogue::AssDialogue(AssDialogue const& that) /// @param _data /// @param version AssDialogue::AssDialogue(wxString _data,int version) -: Comment(false) +: AssEntry(wxString(), "[Events]") +, Comment(false) , Layer(0) , Start(0) , End(5000) , Style("Default") -, Actor("") -, Effect("") -, Text("") { - group = "[Events]"; bool valid = false; // Try parsing in different ways int count = 0; @@ -363,7 +356,7 @@ void AssDialogue::SetMarginString(const wxString origvalue,int which) { // Make it numeric wxString strvalue = origvalue; if (!strvalue.IsNumber()) { - strvalue = ""; + strvalue.clear(); for (size_t i=0;i v) { - wxString data = ""; + wxString data; AssStyle *s; wxArrayInt selections; list->GetSelections(selections); @@ -637,7 +637,7 @@ void DialogStyleManager::CopyToClipboard (wxListBox *list, std::vectorOpen()) { if (wxTheClipboard->IsSupported(wxDF_TEXT)) { @@ -669,7 +669,7 @@ void DialogStyleManager::PasteToCurrent() { /// @brief DOCME void DialogStyleManager::PasteToStorage() { - wxString data = ""; + wxString data; if (wxTheClipboard->Open()) { if (wxTheClipboard->IsSupported(wxDF_TEXT)) { diff --git a/aegisub/src/scintilla_text_ctrl.h b/aegisub/src/scintilla_text_ctrl.h index c4e2045d7..117ebb684 100644 --- a/aegisub/src/scintilla_text_ctrl.h +++ b/aegisub/src/scintilla_text_ctrl.h @@ -57,5 +57,5 @@ public: void SetUnicodeStyling(int start,int length,int style); void SetSelectionU(int start,int end); - ScintillaTextCtrl(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); + ScintillaTextCtrl(wxWindow* parent, wxWindowID id, const wxString& value = wxString(), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); }; diff --git a/aegisub/src/subs_edit_box.cpp b/aegisub/src/subs_edit_box.cpp index 062241c33..167d4c655 100644 --- a/aegisub/src/subs_edit_box.cpp +++ b/aegisub/src/subs_edit_box.cpp @@ -100,7 +100,7 @@ std::pair get_selection(SubsTextEditCtrl *TextEdit) { /// @param tag Tag to get the value of /// @param alt Alternate name of the tag, if any template -static T get_value(AssDialogue const& line, int blockn, T initial, wxString tag, wxString alt = "") { +static T get_value(AssDialogue const& line, int blockn, T initial, wxString tag, wxString alt = wxString()) { for (int i = blockn; i >= 0; i--) { AssDialogueBlockOverride *ovr = dynamic_cast(line.Blocks[i]); if (!ovr) continue; diff --git a/aegisub/src/subs_grid.cpp b/aegisub/src/subs_grid.cpp index b3c313102..c53083911 100644 --- a/aegisub/src/subs_grid.cpp +++ b/aegisub/src/subs_grid.cpp @@ -181,7 +181,7 @@ void SubtitlesGrid::InsertLine(AssDialogue *line,int n,bool after,bool update) { void SubtitlesGrid::CopyLines(wxArrayInt target) { // Prepare text - wxString data = ""; + wxString data; AssDialogue *cur; int nrows = target.Count(); bool first = true; diff --git a/aegisub/src/timeedit_ctrl.h b/aegisub/src/timeedit_ctrl.h index af82eb74b..30aa68063 100644 --- a/aegisub/src/timeedit_ctrl.h +++ b/aegisub/src/timeedit_ctrl.h @@ -94,5 +94,5 @@ public: /// @param value Initial value. Must be a valid time string or empty /// @param size Initial control size /// @param asEnd Treat the time as a line end time (rather than start) for time <-> frame number conversions - TimeEdit(wxWindow* parent, wxWindowID id, agi::Context *c, const wxString& value = "", const wxSize& size = wxDefaultSize, bool asEnd = false); + TimeEdit(wxWindow* parent, wxWindowID id, agi::Context *c, const wxString& value = wxString(), const wxSize& size = wxDefaultSize, bool asEnd = false); }; diff --git a/aegisub/src/validators.h b/aegisub/src/validators.h index b35df4b52..fae3da599 100644 --- a/aegisub/src/validators.h +++ b/aegisub/src/validators.h @@ -75,7 +75,7 @@ public: /// @param val Initial value to set the associated control to /// @param isfloat Allow floats, or just ints? /// @param issigned Allow negative numbers? - explicit NumValidator(wxString val = "", bool isfloat=false, bool issigned=false); + explicit NumValidator(wxString val = wxString(), bool isfloat=false, bool issigned=false); /// Constructor /// @param val Initial value to set the associated control to diff --git a/aegisub/src/visual_tool.h b/aegisub/src/visual_tool.h index f86a3dee0..6dc565557 100644 --- a/aegisub/src/visual_tool.h +++ b/aegisub/src/visual_tool.h @@ -125,7 +125,7 @@ protected: /// @brief Commit the current file state /// @param message Description of changes for undo - void Commit(wxString message = ""); + void Commit(wxString message = wxString()); bool IsDisplayed(AssDialogue *line) const; /// Get the line's position if it's set, or it's default based on style if not