From 0003ac6873c754126375295dd0052017df6fb367 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 3 Nov 2023 01:36:00 +0100 Subject: [PATCH] Replace wxImageList::Init() with member initializers in wxMSW No real change, just initialize members in their declarations and get rid of now unnecessary Init(). --- include/wx/msw/imaglist.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/include/wx/msw/imaglist.h b/include/wx/msw/imaglist.h index 19736b3eb3..3c3b8f90f4 100644 --- a/include/wx/msw/imaglist.h +++ b/include/wx/msw/imaglist.h @@ -19,7 +19,7 @@ public: * Public interface */ - wxImageList() { Init(); } + wxImageList() = default; // Creates an image list. // Specify the width and height of the images in the list, @@ -27,7 +27,6 @@ public: // from icons), and the initial size of the list. wxImageList(int width, int height, bool mask = true, int initialCount = 1) { - Init(); Create(width, height, mask, initialCount); } virtual ~wxImageList(); @@ -191,7 +190,7 @@ public: WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; } protected: - WXHIMAGELIST m_hImageList; + WXHIMAGELIST m_hImageList = nullptr; wxSize m_size; private: @@ -203,13 +202,7 @@ private: void GetImageListBitmaps(wxMSWBitmaps& bitmaps, const wxBitmap& bitmap, const wxBitmap& mask); - bool m_useMask; - - void Init() - { - m_hImageList = nullptr; - m_useMask = false; - } + bool m_useMask = false; wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxImageList); };