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:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user