From 61e4534bd24136df6c2009878570fdfca1a2e770 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 30 Oct 2018 22:47:21 +0100 Subject: [PATCH] Deprecate useless wxGenericImageList::Create() overload This overload doesn't do anything and doesn't exist in the MSW version, so deprecate it. --- include/wx/generic/imaglist.h | 6 +++++- src/generic/imaglist.cpp | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/wx/generic/imaglist.h b/include/wx/generic/imaglist.h index 25157a04f2..227f0c7114 100644 --- a/include/wx/generic/imaglist.h +++ b/include/wx/generic/imaglist.h @@ -25,7 +25,6 @@ public: 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 ); - bool Create(); virtual int GetImageCount() const; virtual bool GetSize( int index, int &width, int &height ) const; @@ -45,6 +44,11 @@ public: int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = false); +#if WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_MSG("Don't use this overload: it's not portable and does nothing") + bool Create() { return true; } +#endif // WXWIN_COMPATIBILITY_3_0 + // Internal use only const wxBitmap *GetBitmapPtr(int index) const; private: diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index aeb31ba57f..5613be69f0 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -49,11 +49,6 @@ bool wxGenericImageList::Create( int width, int height, bool WXUNUSED(mask), int { m_size = wxSize(width, height); - return Create(); -} - -bool wxGenericImageList::Create() -{ return true; }