diff --git a/include/wx/propgrid/advprops.h b/include/wx/propgrid/advprops.h index dc1abc28e6..bbfa363e03 100644 --- a/include/wx/propgrid/advprops.h +++ b/include/wx/propgrid/advprops.h @@ -71,8 +71,8 @@ public: wxColourPropertyValue() : wxObject() + , m_type(0) { - m_type = 0; } virtual ~wxColourPropertyValue() @@ -81,9 +81,9 @@ public: wxColourPropertyValue( const wxColourPropertyValue& v ) : wxObject() + , m_type(v.m_type) , m_colour(v.m_colour) { - m_type = v.m_type; } void Init( wxUint32 type, const wxColour& colour ) @@ -94,15 +94,15 @@ public: wxColourPropertyValue( const wxColour& colour ) : wxObject() + , m_type(wxPG_COLOUR_CUSTOM) , m_colour(colour) { - m_type = wxPG_COLOUR_CUSTOM; } wxColourPropertyValue( wxUint32 type ) : wxObject() + , m_type(type) { - m_type = type; } wxColourPropertyValue( wxUint32 type, const wxColour& colour ) diff --git a/include/wx/propgrid/editors.h b/include/wx/propgrid/editors.h index 4c58a442ac..937d93d973 100644 --- a/include/wx/propgrid/editors.h +++ b/include/wx/propgrid/editors.h @@ -67,8 +67,8 @@ public: // Constructor. wxPGEditor() : wxObject() + , m_clientData(NULL) { - m_clientData = NULL; } // Destructor. @@ -418,8 +418,8 @@ class WXDLLIMPEXP_PROPGRID wxPGEditorDialogAdapter : public wxObject public: wxPGEditorDialogAdapter() : wxObject() + , m_clientData(NULL) { - m_clientData = NULL; } virtual ~wxPGEditorDialogAdapter() { } diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 14c4508920..d5aba7601c 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -648,12 +648,13 @@ public: wxPGChoiceEntry(); wxPGChoiceEntry(const wxPGChoiceEntry& other) : wxPGCell(other) + , m_value(other.m_value) { - m_value = other.m_value; } wxPGChoiceEntry( const wxString& label, int value = wxPG_INVALID_VALUE ) - : wxPGCell(), m_value(value) + : wxPGCell() + , m_value(value) { SetText(label); } diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 45cbb86002..89b8b7eb92 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -334,8 +334,8 @@ public: wxPGCommonValue( const wxString& label, wxPGCellRenderer* renderer ) : m_label(label) + , m_renderer(renderer) { - m_renderer = renderer; renderer->IncRef(); } virtual ~wxPGCommonValue() @@ -408,9 +408,9 @@ class WXDLLIMPEXP_PROPGRID wxPGValidationInfo friend class wxPropertyGrid; public: wxPGValidationInfo() + : m_failureBehavior(0) + , m_isFailing(false) { - m_failureBehavior = 0; - m_isFailing = false; } ~wxPGValidationInfo() diff --git a/include/wx/propgrid/propgridpagestate.h b/include/wx/propgrid/propgridpagestate.h index 7f5f25bb57..4e747d90c6 100644 --- a/include/wx/propgrid/propgridpagestate.h +++ b/include/wx/propgrid/propgridpagestate.h @@ -26,11 +26,11 @@ class WXDLLIMPEXP_PROPGRID wxPropertyGridHitTestResult friend class wxPropertyGridPageState; public: wxPropertyGridHitTestResult() + : m_property(NULL) + , m_column(-1) + , m_splitter(-1) + , m_splitterHitOffset(0) { - m_property = NULL; - m_column = -1; - m_splitter = -1; - m_splitterHitOffset = 0; } ~wxPropertyGridHitTestResult() diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index f3b9348884..c9add08db3 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -113,10 +113,9 @@ class wxPGSpinButton : public wxSpinButton { public: wxPGSpinButton() : wxSpinButton() + , m_hasCapture(false) + , m_spins(1) { - m_hasCapture = false; - m_spins = 1; - Bind(wxEVT_LEFT_DOWN, &wxPGSpinButton::OnMouseLeftDown, this); Bind(wxEVT_LEFT_UP, &wxPGSpinButton::OnMouseLeftUp, this); Bind(wxEVT_MOTION, &wxPGSpinButton::OnMouseMove, this); diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 7d076b4e2f..46647cc32c 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -492,11 +492,11 @@ public: wxPGDoubleClickProcessor( wxOwnerDrawnComboBox* combo, wxBoolProperty* property ) : wxEvtHandler() + , m_timeLastMouseUp(0) + , m_combo(combo) + , m_property(property) + , m_downReceived(false) { - m_timeLastMouseUp = 0; - m_combo = combo; - m_property = property; - m_downReceived = false; } protected: @@ -575,8 +575,8 @@ public: wxPGComboBox() : wxOwnerDrawnComboBox() + , m_dclickProcessor(NULL) { - m_dclickProcessor = NULL; } ~wxPGComboBox() @@ -1482,11 +1482,11 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize ) : wxControl(parent,id,pos,size,wxBORDER_NONE|wxWANTS_CHARS) + , m_state(0) { // Due to SetOwnFont stuff necessary for GTK+ 1.2, we need to have this SetFont( parent->GetFont() ); - m_state = 0; SetBoxHeight(12); SetBackgroundStyle( wxBG_STYLE_PAINT ); } diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 4a3201178a..ec28283eb2 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -333,10 +333,10 @@ wxEND_EVENT_TABLE() wxPropertyGridPage::wxPropertyGridPage() : wxEvtHandler(), wxPropertyGridInterface(), wxPropertyGridPageState() + , m_manager(NULL) + , m_isDefault(false) { m_pState = this; // wxPropertyGridInterface to point to State - m_manager = NULL; - m_isDefault = false; } wxPropertyGridPage::~wxPropertyGridPage() @@ -395,10 +395,10 @@ class wxPGHeaderCtrl : public wxHeaderCtrl { public: wxPGHeaderCtrl(wxPropertyGridManager* manager, wxWindowID id, const wxPoint& pos, - const wxSize& size, long style) : - wxHeaderCtrl(manager, id, pos, size, style) + const wxSize& size, long style) + : wxHeaderCtrl(manager, id, pos, size, style) + , m_manager(manager) { - m_manager = manager; EnsureColumnCount(2); // Seed titles with defaults diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index f05bb657bd..8b6600ea86 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -354,8 +354,8 @@ wxSize wxPGDefaultRenderer::GetImageSize( const wxPGProperty* property, wxPGCellData::wxPGCellData() : wxObjectRefData() + , m_hasValidText(false) { - m_hasValidText = false; } // ----------------------------------------------------------------------- diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 60f8eade48..5271d995f1 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -166,7 +166,9 @@ wxPGGlobalVarsClass* wxPGGlobalVars = NULL; wxPGGlobalVarsClass::wxPGGlobalVarsClass() // Prepare some shared variants - : m_vEmptyString(wxString()) + : m_fontFamilyChoices(NULL) + , m_defaultRenderer(new wxPGDefaultRenderer()) + , m_vEmptyString(wxString()) , m_vZero(0L) , m_vMinusOne(-1L) , m_vTrue(true) @@ -184,6 +186,10 @@ wxPGGlobalVarsClass::wxPGGlobalVarsClass() #if wxPG_COMPATIBILITY_1_4 , m_strInlineHelp(wxS("InlineHelp")) #endif + , m_autoGetTranslation(false) + , m_offline(0) + , m_extraStyle(0) + , m_warnings(0) { wxPGProperty::sm_wxPG_LABEL = new wxString(wxPG_LABEL_STRING); @@ -191,18 +197,6 @@ wxPGGlobalVarsClass::wxPGGlobalVarsClass() m_boolChoices.Add(_("False")); /* TRANSLATORS: Name of Boolean true value */ m_boolChoices.Add(_("True")); - - m_fontFamilyChoices = NULL; - - m_defaultRenderer = new wxPGDefaultRenderer(); - - m_autoGetTranslation = false; - - m_offline = 0; - - m_extraStyle = 0; - - m_warnings = 0; } @@ -6338,8 +6332,8 @@ void wxPropertyGridEvent::Init() wxPropertyGridEvent::wxPropertyGridEvent(wxEventType commandType, int id) : wxCommandEvent(commandType,id) + , m_property(NULL) { - m_property = NULL; Init(); } @@ -6347,15 +6341,15 @@ wxPropertyGridEvent::wxPropertyGridEvent(wxEventType commandType, int id) wxPropertyGridEvent::wxPropertyGridEvent(const wxPropertyGridEvent& event) : wxCommandEvent(event) + , m_property(event.m_property) + , m_pg(event.m_pg) + , m_validationInfo(event.m_validationInfo) + , m_canVeto(event.m_canVeto) + , m_wasVetoed(event.m_wasVetoed) { m_eventType = event.GetEventType(); m_eventObject = event.m_eventObject; - m_pg = event.m_pg; OnPropertyGridSet(); - m_property = event.m_property; - m_validationInfo = event.m_validationInfo; - m_canVeto = event.m_canVeto; - m_wasVetoed = event.m_wasVetoed; } // ----------------------------------------------------------------------- @@ -6408,9 +6402,9 @@ wxEvent* wxPropertyGridEvent::Clone() const // ----------------------------------------------------------------------- wxPropertyGridPopulator::wxPropertyGridPopulator() + : m_pg(NULL) + , m_state(NULL) { - m_state = NULL; - m_pg = NULL; wxPGGlobalVars->m_offline++; } diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 572e52bddd..77c6734601 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -188,27 +188,26 @@ void wxPropertyGridIteratorBase::Next( bool iterateChildren ) // ----------------------------------------------------------------------- wxPropertyGridPageState::wxPropertyGridPageState() + : m_pPropGrid(NULL) + , m_properties(&m_regularArray) + , m_abcArray(NULL) + , m_currentCategory(NULL) + , m_width(0) + , m_virtualHeight(0) + , m_itemsAdded(false) + , m_anyModified(false) + , m_vhCalcPending(false) + , m_fSplitterX(wxPG_DEFAULT_SPLITTERX) + , m_isSplitterPreSet(false) + , m_dontCenterSplitter(false) { - m_pPropGrid = NULL; m_regularArray.SetParentState(this); - m_properties = &m_regularArray; - m_abcArray = NULL; - m_currentCategory = NULL; - m_width = 0; - m_virtualHeight = 0; - m_itemsAdded = false; - m_anyModified = false; - m_vhCalcPending = false; m_colWidths.push_back( wxPG_DEFAULT_SPLITTERX ); m_colWidths.push_back( wxPG_DEFAULT_SPLITTERX ); - m_fSplitterX = wxPG_DEFAULT_SPLITTERX; m_columnProportions.push_back(1); m_columnProportions.push_back(1); - m_isSplitterPreSet = false; - m_dontCenterSplitter = false; - // By default, we only have the 'value' column editable m_editableColumns.push_back(1); }