Use ctor with default argument instead of providing specialized ctor

We can use 2-parameter ctor with default NULL value for second parameter
instead of providing a special 1-paramater ctor.
This commit is contained in:
Artur Wieczorek
2020-02-09 20:31:58 +01:00
parent f2f9cbe619
commit 9dbd3b4946
2 changed files with 9 additions and 18 deletions

View File

@@ -27,21 +27,16 @@ class WXDLLIMPEXP_FWD_PROPGRID wxPropertyGrid;
class wxPGWindowList
{
public:
void SetSecondary( wxWindow* secondary ) { m_secondary = secondary; }
wxPGWindowList(wxWindow* primary, wxWindow* secondary = NULL)
: m_primary(primary)
, m_secondary(secondary)
{
}
void SetSecondary(wxWindow* secondary) { m_secondary = secondary; }
wxWindow* m_primary;
wxWindow* m_secondary;
wxPGWindowList( wxWindow* a )
{
m_primary = a;
m_secondary = NULL;
}
wxPGWindowList( wxWindow* a, wxWindow* b )
{
m_primary = a;
m_secondary = b;
}
};
// -----------------------------------------------------------------------

View File

@@ -14,13 +14,9 @@
class wxPGWindowList
{
public:
void SetSecondary( wxWindow* secondary );
wxPGWindowList(wxWindow* primary, wxWindow* secondary = NULL);
wxWindow* m_primary;
wxWindow* m_secondary;
wxPGWindowList( wxWindow* a );
wxPGWindowList( wxWindow* a, wxWindow* b );
void SetSecondary(wxWindow* secondary);
};