Initialize wxGenericImageList members in default ctor
Don't leave m_useMask and m_scaleFactor uninitialized -- even if this probably doesn't matter, call Create() to make sure they have well-defined values for the default-constructed objects.
This commit is contained in:
@@ -22,7 +22,7 @@ class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
class WXDLLIMPEXP_CORE wxGenericImageList: public wxObject
|
||||
{
|
||||
public:
|
||||
wxGenericImageList() { }
|
||||
wxGenericImageList();
|
||||
wxGenericImageList( int width, int height, bool mask = true, int initialCount = 1 );
|
||||
virtual ~wxGenericImageList();
|
||||
bool Create( int width, int height, bool mask = true, int initialCount = 1 );
|
||||
|
@@ -29,6 +29,11 @@
|
||||
wxIMPLEMENT_DYNAMIC_CLASS(wxGenericImageList, wxObject);
|
||||
wxIMPLEMENT_DYNAMIC_CLASS(wxImageList, wxGenericImageList);
|
||||
|
||||
wxGenericImageList::wxGenericImageList()
|
||||
{
|
||||
Create(0, 0, false);
|
||||
}
|
||||
|
||||
wxGenericImageList::wxGenericImageList( int width, int height, bool mask, int initialCount )
|
||||
{
|
||||
(void)Create(width, height, mask, initialCount);
|
||||
|
Reference in New Issue
Block a user