Tidy up some initialisation.
authorCarl Hetherington <cth@carlh.net>
Thu, 8 Apr 2021 22:35:52 +0000 (00:35 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 8 Apr 2021 22:35:52 +0000 (00:35 +0200)
src/wx/text_panel.cc
src/wx/text_panel.h

index 5e00d4f41b820cd1a6aee5c514ca92a99101de1b..a3e8a2c63be44fe039f58242fc6b9bb0e74a6b1b 100644 (file)
@@ -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)))
 /** @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)
        , _original_type (t)
-       , _loading_analysis (false)
 {
        wxString refer = _("Use this DCP's subtitle as OV and make VF");
        if (t == TextType::CLOSED_CAPTION) {
 {
        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);
 
                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;
        }
 
                ++r;
        }
 
index 7337e5258b8c55ed4fef2ceba12bdf873a104de3..c76449513dc6a7aaaa676affed767207920a575f 100644 (file)
@@ -73,7 +73,7 @@ private:
 
        wxCheckBox* _reference;
        wxStaticText* _reference_note;
 
        wxCheckBox* _reference;
        wxStaticText* _reference_note;
-       wxCheckBox* _outline_subtitles;
+       wxCheckBox* _outline_subtitles = nullptr;
        wxCheckBox* _use;
        wxChoice* _type;
        wxCheckBox* _burn;
        wxCheckBox* _use;
        wxChoice* _type;
        wxCheckBox* _burn;
@@ -94,14 +94,14 @@ private:
        wxStaticText* _line_spacing_label;
        wxStaticText* _line_spacing_pc_label;
        SpinCtrl* _line_spacing;
        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;
        wxStaticText* _stream_label;
        wxChoice* _stream;
        wxButton* _text_view_button;
-       TextView* _text_view;
+       TextView* _text_view = nullptr;
        wxButton* _fonts_dialog_button;
        wxButton* _fonts_dialog_button;
-       FontsDialog* _fonts_dialog;
+       FontsDialog* _fonts_dialog = nullptr;
        wxButton* _appearance_dialog_button;
        TextType _original_type;
        wxStaticText* _language_label = nullptr;
        wxButton* _appearance_dialog_button;
        TextType _original_type;
        wxStaticText* _language_label = nullptr;
@@ -115,5 +115,5 @@ private:
        std::weak_ptr<Content> _analysis_content;
        boost::signals2::scoped_connection _analysis_finished_connection;
        std::shared_ptr<SubtitleAnalysis> _analysis;
        std::weak_ptr<Content> _analysis_content;
        boost::signals2::scoped_connection _analysis_finished_connection;
        std::shared_ptr<SubtitleAnalysis> _analysis;
-       bool _loading_analysis;
+       bool _loading_analysis = false;
 };
 };