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/wx_util.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/wx_util.cc')
| -rw-r--r-- | src/wx/wx_util.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index b1cd873fc..78fa3f544 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -29,7 +29,6 @@ #include "password_entry.h" #include "region_subtag_widget.h" #include "static_text.h" -#include "wx_ptr.h" #include "wx_util.h" #include "wx_variant.h" #include "lib/config.h" @@ -164,13 +163,13 @@ add_label_to_sizer (wxGridBagSizer* s, wxStaticText* t, bool, wxGBPosition pos, void error_dialog (wxWindow* parent, wxString m, optional<wxString> e) { - auto d = make_wx<wxMessageDialog>(parent, m, variant::wx::dcpomatic(), wxOK | wxICON_ERROR); + wxMessageDialog dialog(parent, m, variant::wx::dcpomatic(), wxOK | wxICON_ERROR); if (e) { wxString em = *e; em[0] = wxToupper (em[0]); - d->SetExtendedMessage (em); + dialog.SetExtendedMessage(em); } - d->ShowModal (); + dialog.ShowModal(); } @@ -181,8 +180,8 @@ error_dialog (wxWindow* parent, wxString m, optional<wxString> e) void message_dialog (wxWindow* parent, wxString m) { - auto d = make_wx<wxMessageDialog>(parent, m, variant::wx::dcpomatic(), wxOK | wxICON_INFORMATION); - d->ShowModal (); + wxMessageDialog dialog(parent, m, variant::wx::dcpomatic(), wxOK | wxICON_INFORMATION); + dialog.ShowModal(); } @@ -190,8 +189,8 @@ message_dialog (wxWindow* parent, wxString m) bool confirm_dialog (wxWindow* parent, wxString m) { - auto d = make_wx<wxMessageDialog>(parent, m, variant::wx::dcpomatic(), wxYES_NO | wxICON_QUESTION); - return d->ShowModal() == wxID_YES; + wxMessageDialog dialog(parent, m, variant::wx::dcpomatic(), wxYES_NO | wxICON_QUESTION); + return dialog.ShowModal() == wxID_YES; } |
