Merge an if statement.
authorCarl Hetherington <cth@carlh.net>
Fri, 2 May 2025 23:04:48 +0000 (01:04 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 2 May 2025 23:04:52 +0000 (01:04 +0200)
src/wx/update_dialog.cc

index 5865159251c398d77da430a82082096ebc341c7a..0ed8c23e494e1f1db2b027449d0757d93588f744 100644 (file)
@@ -70,9 +70,8 @@ UpdateDialog::UpdateDialog(wxWindow* parent, optional<string> stable, optional<s
 
        overall_sizer->Add(table, 0, wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);
 
-       auto buttons = CreateButtonSizer (wxOK);
-       if (buttons) {
-               overall_sizer->Add (buttons, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
+       if (auto buttons = CreateButtonSizer(wxOK)) {
+               overall_sizer->Add(buttons, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
        }
 
        SetSizerAndFit(overall_sizer);