X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0fdd3cc8810f9499af3ea92db2c7fcacc557cb6f..5a10553d6f824089bedaad57db6ed7fad0bafc89:/src/xrc/xmlres.cpp diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 479dbbd138..b10e7dfcb8 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -69,35 +69,25 @@ wxXmlResource::wxXmlResource(int flags, const wxString& domain) { m_flags = flags; m_version = -1; - m_domain = NULL; - if (! domain.empty() ) - SetDomain(domain); + SetDomain(domain); } wxXmlResource::wxXmlResource(const wxString& filemask, int flags, const wxString& domain) { m_flags = flags; m_version = -1; - m_domain = NULL; - if (! domain.empty() ) - SetDomain(domain); + SetDomain(domain); Load(filemask); } wxXmlResource::~wxXmlResource() { - if (m_domain) - free(m_domain); ClearHandlers(); } -void wxXmlResource::SetDomain(const wxChar* domain) +void wxXmlResource::SetDomain(const wxString& domain) { - if (m_domain) - free(m_domain); - m_domain = NULL; - if (domain && wxStrlen(domain)) - m_domain = wxStrdup(domain); + m_domain = domain; }