Replace wxGenericAboutDialog::Init() with member initialization

No real changes, just modernize the code a bit.
This commit is contained in:
Vadim Zeitlin 2023-02-23 19:07:25 +00:00
parent 964f2ee0c5
commit ff0a255a80

View file

@ -42,13 +42,11 @@ public:
// --------------------------------
// default ctor, you must use Create() to really initialize the dialog
wxGenericAboutDialog() { Init(); }
wxGenericAboutDialog() = default;
// ctor which fully initializes the object
wxGenericAboutDialog(const wxAboutDialogInfo& info, wxWindow* parent = nullptr)
{
Init();
(void)Create(info, parent);
}
@ -80,9 +78,6 @@ protected:
#endif // wxUSE_COLLPANE
private:
// common part of all ctors
void Init() { m_sizerText = nullptr; }
#if !wxUSE_MODAL_ABOUT_DIALOG
// An explicit handler for deleting the dialog when it's closed is needed
// when we show it non-modally.
@ -90,7 +85,7 @@ private:
void OnOK(wxCommandEvent& event);
#endif // !wxUSE_MODAL_ABOUT_DIALOG
wxSizer *m_sizerText;
wxSizer *m_sizerText = nullptr;
};
// unlike wxAboutBox which can show either the native or generic about dialog,