From dd7996d3c27f167d4f80bd8862f39781507589d7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 9 Apr 2021 00:35:52 +0200 Subject: [PATCH] Tidy up some initialisation. --- src/wx/text_panel.cc | 8 +------- src/wx/text_panel.h | 12 ++++++------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 5e00d4f41..a3e8a2c63 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -60,13 +60,7 @@ using boost::bind; /** @param t Original text type of the content, if known */ TextPanel::TextPanel (ContentPanel* p, TextType t) : ContentSubPanel (p, std_to_wx(text_type_to_name(t))) - , _outline_subtitles (0) - , _dcp_track_label (0) - , _dcp_track (0) - , _text_view (0) - , _fonts_dialog (0) , _original_type (t) - , _loading_analysis (false) { wxString refer = _("Use this DCP's subtitle as OV and make VF"); if (t == TextType::CLOSED_CAPTION) { @@ -298,7 +292,7 @@ TextPanel::add_to_grid () s->Add (_fonts_dialog_button, 1, wxALL, DCPOMATIC_SIZER_GAP); s->Add (_appearance_dialog_button, 1, wxALL, DCPOMATIC_SIZER_GAP); - _grid->Add (s, wxGBPosition (r, 0), wxGBSpan (1, 2)); + _grid->Add (s, wxGBPosition(r, 0), wxGBSpan(1, 2)); ++r; } diff --git a/src/wx/text_panel.h b/src/wx/text_panel.h index 7337e5258..c76449513 100644 --- a/src/wx/text_panel.h +++ b/src/wx/text_panel.h @@ -73,7 +73,7 @@ private: wxCheckBox* _reference; wxStaticText* _reference_note; - wxCheckBox* _outline_subtitles; + wxCheckBox* _outline_subtitles = nullptr; wxCheckBox* _use; wxChoice* _type; wxCheckBox* _burn; @@ -94,14 +94,14 @@ private: wxStaticText* _line_spacing_label; wxStaticText* _line_spacing_pc_label; SpinCtrl* _line_spacing; - wxStaticText* _dcp_track_label; - wxChoice* _dcp_track; + wxStaticText* _dcp_track_label = nullptr; + wxChoice* _dcp_track = nullptr; wxStaticText* _stream_label; wxChoice* _stream; wxButton* _text_view_button; - TextView* _text_view; + TextView* _text_view = nullptr; wxButton* _fonts_dialog_button; - FontsDialog* _fonts_dialog; + FontsDialog* _fonts_dialog = nullptr; wxButton* _appearance_dialog_button; TextType _original_type; wxStaticText* _language_label = nullptr; @@ -115,5 +115,5 @@ private: std::weak_ptr _analysis_content; boost::signals2::scoped_connection _analysis_finished_connection; std::shared_ptr _analysis; - bool _loading_analysis; + bool _loading_analysis = false; }; -- 2.30.2