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()
|
wxIconBundle::wxIconBundle()
|
||||||
: wxGDIObject()
|
: wxGDIObject()
|
||||||
{
|
{
|
||||||
m_refData = new wxIconBundleRefData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxIconBundle::wxIconBundle(const wxString& file, long type)
|
wxIconBundle::wxIconBundle(const wxString& file, long type)
|
||||||
: wxGDIObject()
|
: wxGDIObject()
|
||||||
{
|
{
|
||||||
m_refData = new wxIconBundleRefData;
|
|
||||||
AddIcon(file, type);
|
AddIcon(file, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +81,6 @@ wxIconBundle::wxIconBundle(const wxIconBundle& icon)
|
|||||||
wxIconBundle::wxIconBundle(const wxIcon& icon)
|
wxIconBundle::wxIconBundle(const wxIcon& icon)
|
||||||
: wxGDIObject()
|
: wxGDIObject()
|
||||||
{
|
{
|
||||||
m_refData = new wxIconBundleRefData;
|
|
||||||
AddIcon(icon);
|
AddIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,9 +96,7 @@ wxObjectRefData *wxIconBundle::CloneRefData(const wxObjectRefData *data) const
|
|||||||
|
|
||||||
void wxIconBundle::DeleteIcons()
|
void wxIconBundle::DeleteIcons()
|
||||||
{
|
{
|
||||||
wxIconBundleRefData* ref = new wxIconBundleRefData();
|
|
||||||
UnRef();
|
UnRef();
|
||||||
m_refData = ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIconBundle::IsOk() const
|
bool wxIconBundle::IsOk() const
|
||||||
|
Reference in New Issue
Block a user