Add wxImageList::Init() to wxMSW version

Initialize all fields in a single place, just as it's done in most of
the other classes.

No real changes.
This commit is contained in:
Vadim Zeitlin
2022-02-06 22:38:25 +00:00
parent f0c6b42ad0
commit 7d92f321c7
2 changed files with 10 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ public:
* Public interface
*/
wxImageList();
wxImageList() { Init(); }
// Creates an image list.
// Specify the width and height of the images in the list,
@@ -32,7 +32,7 @@ public:
// from icons), and the initial size of the list.
wxImageList(int width, int height, bool mask = true, int initialCount = 1)
{
m_hImageList = NULL;
Init();
Create(width, height, mask, initialCount);
}
virtual ~wxImageList();
@@ -198,8 +198,16 @@ public:
protected:
WXHIMAGELIST m_hImageList;
wxSize m_size;
private:
bool m_useMask;
void Init()
{
m_hImageList = NULL;
m_useMask = false;
}
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxImageList);
};