don't allocate m_refData unnecessarily
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -64,13 +64,11 @@ protected:
|
||||
wxIconBundle::wxIconBundle()
|
||||
: wxGDIObject()
|
||||
{
|
||||
m_refData = new wxIconBundleRefData;
|
||||
}
|
||||
|
||||
wxIconBundle::wxIconBundle(const wxString& file, long type)
|
||||
: wxGDIObject()
|
||||
{
|
||||
m_refData = new wxIconBundleRefData;
|
||||
AddIcon(file, type);
|
||||
}
|
||||
|
||||
@@ -83,7 +81,6 @@ wxIconBundle::wxIconBundle(const wxIconBundle& icon)
|
||||
wxIconBundle::wxIconBundle(const wxIcon& icon)
|
||||
: wxGDIObject()
|
||||
{
|
||||
m_refData = new wxIconBundleRefData;
|
||||
AddIcon(icon);
|
||||
}
|
||||
|
||||
@@ -99,9 +96,7 @@ wxObjectRefData *wxIconBundle::CloneRefData(const wxObjectRefData *data) const
|
||||
|
||||
void wxIconBundle::DeleteIcons()
|
||||
{
|
||||
wxIconBundleRefData* ref = new wxIconBundleRefData();
|
||||
UnRef();
|
||||
m_refData = ref;
|
||||
}
|
||||
|
||||
bool wxIconBundle::IsOk() const
|
||||
|
Reference in New Issue
Block a user