summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-29 23:36:26 +0200
committerCarl Hetherington <cth@carlh.net>2021-06-29 23:36:26 +0200
commitfce82196feb1fbf5f89bfca19f383b93328f6239 (patch)
treebc9ff5a6d94b1b10ae8e701f2404e962c0bfe8f9 /src
parent670acb60e8b0c78b66ea60657a3586b308fe7c93 (diff)
C++11 tidying.
Diffstat (limited to 'src')
-rw-r--r--src/wx/update_dialog.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/wx/update_dialog.cc b/src/wx/update_dialog.cc
index 373e518b1..ec80d45c6 100644
--- a/src/wx/update_dialog.cc
+++ b/src/wx/update_dialog.cc
@@ -18,6 +18,7 @@
*/
+
#include "update_dialog.h"
#include "static_text.h"
#include "wx_util.h"
@@ -26,13 +27,15 @@ DCPOMATIC_DISABLE_WARNINGS
#include <wx/hyperlink.h>
DCPOMATIC_ENABLE_WARNINGS
+
using std::string;
using boost::optional;
+
UpdateDialog::UpdateDialog (wxWindow* parent, optional<string> stable, optional<string> test)
: wxDialog (parent, wxID_ANY, _("Update"))
{
- wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
+ auto overall_sizer = new wxBoxSizer (wxVERTICAL);
wxStaticText* message;
@@ -44,23 +47,23 @@ UpdateDialog::UpdateDialog (wxWindow* parent, optional<string> stable, optional<
overall_sizer->Add (message, 1, wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);
- wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
+ auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
if (stable) {
add_label_to_sizer (table, this, _("Stable version ") + std_to_wx (stable.get ()), true);
- wxHyperlinkCtrl* h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/download", "https://dcpomatic.com/download");
table->Add (h);
+ auto h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/download", "https://dcpomatic.com/download");
}
if (test) {
add_label_to_sizer (table, this, _("Test version ") + std_to_wx (test.get ()), true);
- wxHyperlinkCtrl* h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/test-download", "https://dcpomatic.com/test-download");
table->Add (h);
+ auto h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/test-download", "https://dcpomatic.com/test-download");
}
overall_sizer->Add (table, 1, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, DCPOMATIC_DIALOG_BORDER);
- wxSizer* buttons = CreateButtonSizer (wxOK);
+ auto buttons = CreateButtonSizer (wxOK);
if (buttons) {
overall_sizer->Add (buttons, 1, wxEXPAND | wxALL);
}