Use ctor-initializer rather than assignment for non-POD class members

This commit is contained in:
Paul Cornett
2019-02-25 10:23:35 -08:00
parent 8df0cfba2a
commit 7c3ce912e0
59 changed files with 150 additions and 177 deletions

View File

@@ -269,6 +269,8 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase);
// the default initialization
wxWindowBase::wxWindowBase()
: m_virtualSize(wxDefaultSize)
, m_bestSizeCache(wxDefaultSize)
{
// no window yet, no parent nor children
m_parent = NULL;
@@ -280,9 +282,6 @@ wxWindowBase::wxWindowBase()
m_minHeight =
m_maxHeight = wxDefaultCoord;
// invalidiated cache value
m_bestSizeCache = wxDefaultSize;
// window are created enabled and visible by default
m_isShown =
m_isEnabled = true;
@@ -340,8 +339,6 @@ wxWindowBase::wxWindowBase()
m_accessible = NULL;
#endif
m_virtualSize = wxDefaultSize;
m_scrollHelper = NULL;
m_windowVariant = wxWINDOW_VARIANT_NORMAL;