Initialize wxPropertyGridXmlHandler members in declaration

Ensure that m_pg is initialized to nullptr too.
This commit is contained in:
Vadim Zeitlin 2023-10-31 03:47:26 +01:00
parent 7a392a6623
commit 336a36e618
2 changed files with 4 additions and 4 deletions

View file

@ -47,9 +47,9 @@ public:
void HandlePropertyGridParams(); void HandlePropertyGridParams();
private: private:
wxPropertyGridManager* m_manager; wxPropertyGridManager* m_manager = nullptr;
wxPropertyGrid* m_pg; wxPropertyGrid* m_pg = nullptr;
wxPropertyGridPopulator* m_populator; wxPropertyGridPopulator* m_populator = nullptr;
}; };
#endif // wxUSE_XRC && wxUSE_PROPGRID #endif // wxUSE_XRC && wxUSE_PROPGRID

View file

@ -26,7 +26,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxPropertyGridXmlHandler, wxXmlResourceHandler) IMPLEMENT_DYNAMIC_CLASS(wxPropertyGridXmlHandler, wxXmlResourceHandler)
wxPropertyGridXmlHandler::wxPropertyGridXmlHandler() wxPropertyGridXmlHandler::wxPropertyGridXmlHandler()
:wxXmlResourceHandler(), m_manager(nullptr), m_populator(nullptr) :wxXmlResourceHandler()
{ {
XRC_ADD_STYLE(wxTAB_TRAVERSAL); XRC_ADD_STYLE(wxTAB_TRAVERSAL);
XRC_ADD_STYLE(wxPG_AUTO_SORT); XRC_ADD_STYLE(wxPG_AUTO_SORT);