From d0308d53dd9f4d036d8c5fe8023920fcdfd43f39 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 9 Feb 2025 02:06:04 +0100 Subject: Remove unnecessary wx_ptr It was only ever used for wxDialog subclasses, which can be stack-allocated. --- src/tools/dcpomatic.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/tools/dcpomatic.cc') diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 3d9d571af..7048781e3 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -876,7 +876,7 @@ private: return; } - _kdm_dialog.reset(this, _film); + _kdm_dialog.emplace(this, _film); _kdm_dialog->Show (); } @@ -886,7 +886,7 @@ private: return; } - _dkdm_dialog.reset(this, _film); + _dkdm_dialog.emplace(this, _film); _dkdm_dialog->Show (); } @@ -1083,7 +1083,7 @@ private: void view_video_waveform () { if (!_video_waveform_dialog) { - _video_waveform_dialog.reset(this, _film, _film_viewer); + _video_waveform_dialog.emplace(this, _film, _film_viewer); } _video_waveform_dialog->Show (); @@ -1130,7 +1130,7 @@ private: void tools_manage_templates () { if (!_templates_dialog) { - _templates_dialog.reset(this); + _templates_dialog.emplace(this); } _templates_dialog->Show (); @@ -1578,15 +1578,15 @@ private: wxPanel* _right_panel; FilmViewer _film_viewer; StandardControls* _controls; - wx_ptr _video_waveform_dialog; + boost::optional _video_waveform_dialog; SystemInformationDialog* _system_information_dialog = nullptr; DCPReferencingDialog* _dcp_referencing_dialog = nullptr; HintsDialog* _hints_dialog = nullptr; ServersListDialog* _servers_list_dialog = nullptr; wxPreferencesEditor* _config_dialog = nullptr; - wx_ptr _kdm_dialog; - wx_ptr _dkdm_dialog; - wx_ptr _templates_dialog; + boost::optional _kdm_dialog; + boost::optional _dkdm_dialog; + boost::optional _templates_dialog; wxMenu* _file_menu = nullptr; shared_ptr _film; int _history_items = 0; -- cgit v1.2.3