diff --git a/include/wx/iconbndl.h b/include/wx/iconbndl.h index 1f0747547d..c3f50a170f 100644 --- a/include/wx/iconbndl.h +++ b/include/wx/iconbndl.h @@ -12,19 +12,11 @@ #ifndef _WX_ICONBNDL_H_ #define _WX_ICONBNDL_H_ -#include "wx/dynarray.h" #include "wx/gdiobj.h" // for wxSize #include "wx/gdicmn.h" #include "wx/icon.h" -class WXDLLIMPEXP_FWD_CORE wxIcon; -class WXDLLIMPEXP_FWD_BASE wxString; - -class WXDLLIMPEXP_FWD_CORE wxIconBundle; - -WX_DECLARE_EXPORTED_OBJARRAY(wxIcon, wxIconArray); - // this class can't load bitmaps of type wxBITMAP_TYPE_ICO_RESOURCE, // if you need them, you have to load them manually and call // wxIconCollection::AddIcon @@ -40,12 +32,7 @@ public: // initializes the bundle with a single icon wxIconBundle(const wxIcon& icon); - // initializes the bundle from another icon bundle - wxIconBundle(const wxIconBundle& icon); - - wxIconBundle& operator=(const wxIconBundle& ic) - { if ( this != &ic) Ref(ic); return *this; } - + // default copy ctor and assignment operator are OK // adds all the icons contained in the file to the collection, // if the collection already contains icons with the same diff --git a/src/common/iconbndl.cpp b/src/common/iconbndl.cpp index ab8ecc932d..60e92d558d 100644 --- a/src/common/iconbndl.cpp +++ b/src/common/iconbndl.cpp @@ -8,14 +8,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -27,20 +19,19 @@ #ifndef WX_PRECOMP #include "wx/settings.h" - #include "wx/icon.h" #include "wx/log.h" #include "wx/intl.h" #include "wx/bitmap.h" #include "wx/image.h" #endif +WX_DECLARE_EXPORTED_OBJARRAY(wxIcon, wxIconArray); #include "wx/arrimpl.cpp" - WX_DEFINE_OBJARRAY(wxIconArray) IMPLEMENT_DYNAMIC_CLASS(wxIconBundle, wxGDIObject) -#define M_ICONBUNDLEDATA ((wxIconBundleRefData *)m_refData) +#define M_ICONBUNDLEDATA static_cast(m_refData) // ---------------------------------------------------------------------------- // wxIconBundleRefData @@ -53,10 +44,7 @@ public: virtual bool IsOk() const { return !m_icons.empty(); } -protected: wxIconArray m_icons; - - friend class wxIconBundle; }; // ============================================================================ @@ -64,7 +52,6 @@ protected: // ============================================================================ wxIconBundle::wxIconBundle() - : wxGDIObject() { } @@ -74,12 +61,6 @@ wxIconBundle::wxIconBundle(const wxString& file, wxBitmapType type) AddIcon(file, type); } -wxIconBundle::wxIconBundle(const wxIconBundle& icon) - : wxGDIObject() -{ - Ref(icon); -} - wxIconBundle::wxIconBundle(const wxIcon& icon) : wxGDIObject() { @@ -237,5 +218,3 @@ wxIcon wxIconBundle::GetIconByIndex(size_t n) const return M_ICONBUNDLEDATA->m_icons[n]; } - -