diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-12 01:03:28 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-14 11:41:18 +0200 |
| commit | 449f383f13e5755c523db11f9adef53b58391025 (patch) | |
| tree | 7751c6ede10455de02aa85dcd00d17109c9d57a6 /src/wx/system_information_dialog.cc | |
| parent | 5e640ac3e2f6d5fb079ff65659a1483ddac8672e (diff) | |
Cleanup: use simpler ownership for FilmViewer.
Diffstat (limited to 'src/wx/system_information_dialog.cc')
| -rw-r--r-- | src/wx/system_information_dialog.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/wx/system_information_dialog.cc b/src/wx/system_information_dialog.cc index addb89da4..79a7f735a 100644 --- a/src/wx/system_information_dialog.cc +++ b/src/wx/system_information_dialog.cc @@ -41,20 +41,15 @@ using std::shared_ptr; #if wxCHECK_VERSION(3, 1, 0) -SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr<FilmViewer> weak_viewer) +SystemInformationDialog::SystemInformationDialog(wxWindow* parent, FilmViewer const& viewer) : TableDialog (parent, _("System information"), 2, 1, false) { - auto viewer = weak_viewer.lock (); - shared_ptr<const GLVideoView> gl; - if (viewer) { - gl = std::dynamic_pointer_cast<const GLVideoView>(viewer->video_view()); - } + auto gl = std::dynamic_pointer_cast<const GLVideoView>(viewer.video_view()); if (!gl) { add (_("OpenGL version"), true); add (_("unknown (OpenGL not enabled in DCP-o-matic)"), false); } else { - auto information = gl->information(); auto add_string = [this, &information](GLenum name, wxString label) { add (label, true); @@ -80,7 +75,7 @@ SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr<Fil #else -SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr<FilmViewer>) +SystemInformationDialog::SystemInformationDialog(wxWindow* parent, FilmViewer&) : TableDialog (parent, _("System information"), 2, 1, false) { add (_("OpenGL version"), true); |
