summaryrefslogtreecommitdiff
path: root/src/wx/fonts_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-02-09 02:06:04 +0100
committerCarl Hetherington <cth@carlh.net>2025-02-09 17:29:16 +0100
commitd0308d53dd9f4d036d8c5fe8023920fcdfd43f39 (patch)
tree5b37c1db5dc50e541a542663390061f743fe815a /src/wx/fonts_dialog.cc
parent8d0d9866ae3e0395d899705e27b3806a5de7ef0e (diff)
Remove unnecessary wx_ptr
It was only ever used for wxDialog subclasses, which can be stack-allocated.
Diffstat (limited to 'src/wx/fonts_dialog.cc')
-rw-r--r--src/wx/fonts_dialog.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wx/fonts_dialog.cc b/src/wx/fonts_dialog.cc
index dc1bb5951..315f0b369 100644
--- a/src/wx/fonts_dialog.cc
+++ b/src/wx/fonts_dialog.cc
@@ -184,13 +184,13 @@ FontsDialog::set_from_file_clicked ()
default_dir = char_to_wx("/System/Library/Fonts");
#endif
- auto d = make_wx<wxFileDialog>(this, _("Choose a font file"), default_dir, wxString{}, char_to_wx("*.ttf;*.otf;*.ttc"), wxFD_CHANGE_DIR);
+ wxFileDialog dialog(this, _("Choose a font file"), default_dir, wxString{}, char_to_wx("*.ttf;*.otf;*.ttc"), wxFD_CHANGE_DIR);
- if (d->ShowModal() != wxID_OK) {
+ if (dialog.ShowModal() != wxID_OK) {
return;
}
- font->set_file (wx_to_std(d->GetPath()));
+ font->set_file(wx_to_std(dialog.GetPath()));
setup ();
}
@@ -203,9 +203,9 @@ FontsDialog::set_from_system_font_clicked()
return;
}
- auto dialog = make_wx<SystemFontDialog>(this);
- if (dialog->ShowModal() == wxID_OK) {
- auto font_file = dialog->get_font();
+ SystemFontDialog dialog(this);
+ if (dialog.ShowModal() == wxID_OK) {
+ auto font_file = dialog.get_font();
if (font_file) {
font->set_file(*font_file);
}