From 982a72006934ee293a024acb92dd9119a4d89b54 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek <7330332+a-wi@users.noreply.github.com> Date: Mon, 30 May 2022 19:15:36 +0200 Subject: [PATCH] Use ctor initializer list to initialize data members --- include/wx/propgrid/propgrid.h | 1 - src/propgrid/propgrid.cpp | 18 ++++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index a4b2e3b5c0..b82813132a 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -2154,7 +2154,6 @@ public: } private: - void Init(); void OnPropertyGridSet(); wxDECLARE_DYNAMIC_CLASS(wxPropertyGridEvent); diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 2b5dcd2889..f03dad542f 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -6297,22 +6297,15 @@ wxDEFINE_EVENT( wxEVT_PG_COLS_RESIZED, wxPropertyGridEvent); // ----------------------------------------------------------------------- -void wxPropertyGridEvent::Init() -{ - m_validationInfo = NULL; - m_column = 1; - m_canVeto = false; - m_wasVetoed = false; - m_pg = NULL; -} - -// ----------------------------------------------------------------------- - wxPropertyGridEvent::wxPropertyGridEvent(wxEventType commandType, int id) : wxCommandEvent(commandType,id) , m_property(NULL) + , m_pg(NULL) + , m_validationInfo(NULL) + , m_column(1) + , m_canVeto(false) + , m_wasVetoed(false) { - Init(); } // ----------------------------------------------------------------------- @@ -6322,6 +6315,7 @@ wxPropertyGridEvent::wxPropertyGridEvent(const wxPropertyGridEvent& event) , m_property(event.m_property) , m_pg(event.m_pg) , m_validationInfo(event.m_validationInfo) + , m_column(event.m_column) , m_canVeto(event.m_canVeto) , m_wasVetoed(event.m_wasVetoed) {