diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-02-09 02:06:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-02-09 17:29:16 +0100 |
| commit | d0308d53dd9f4d036d8c5fe8023920fcdfd43f39 (patch) | |
| tree | 5b37c1db5dc50e541a542663390061f743fe815a /src/wx/text_panel.cc | |
| parent | 8d0d9866ae3e0395d899705e27b3806a5de7ef0e (diff) | |
Remove unnecessary wx_ptr
It was only ever used for wxDialog subclasses, which can be
stack-allocated.
Diffstat (limited to 'src/wx/text_panel.cc')
| -rw-r--r-- | src/wx/text_panel.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index b69f115f7..ddb5bf56d 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -356,9 +356,9 @@ TextPanel::dcp_track_changed () optional<DCPTextTrack> track; if (_dcp_track->GetSelection() == int(_dcp_track->GetCount()) - 1) { - auto d = make_wx<DCPTextTrackDialog>(this); - if (d->ShowModal() == wxID_OK) { - track = d->get(); + DCPTextTrackDialog dialog(this); + if (dialog.ShowModal() == wxID_OK) { + track = dialog.get(); } } else { /* Find the DCPTextTrack that was selected */ @@ -689,7 +689,7 @@ TextPanel::text_view_clicked () auto decoder = decoder_factory (_parent->film(), c.front(), false, false, shared_ptr<Decoder>()); if (decoder) { - _text_view.reset(this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type), decoder, _parent->film_viewer()); + _text_view.emplace(this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type), decoder, _parent->film_viewer()); _text_view->show(); } } @@ -701,8 +701,8 @@ TextPanel::fonts_dialog_clicked () auto c = _parent->selected_text (); DCPOMATIC_ASSERT (c.size() == 1); - _fonts_dialog.reset(this, c.front(), c.front()->text_of_original_type(_original_type)); - _fonts_dialog->Show (); + _fonts_dialog.emplace(this, c.front(), c.front()->text_of_original_type(_original_type)); + _fonts_dialog->Show(); } |
