From 426bb74a93e80251ecbccff454ff4715cd05f6a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 29 Sep 2000 19:58:31 +0000 Subject: [PATCH] removed loading from in-memory document (illicit idea) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/xml/xmlres.h | 3 +-- contrib/src/xml/xmlres.cpp | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/contrib/include/wx/xml/xmlres.h b/contrib/include/wx/xml/xmlres.h index 006c166a20..fd012efd0e 100644 --- a/contrib/include/wx/xml/xmlres.h +++ b/contrib/include/wx/xml/xmlres.h @@ -45,7 +45,6 @@ class WXDLLEXPORT wxXmlResourceDataRecord wxString File; wxXmlDocument *Doc; - bool DocOwned; wxDateTime Time; }; @@ -110,7 +109,7 @@ class WXDLLEXPORT wxXmlResource : public wxObject wxPanel *LoadPanel(wxWindow *parent, const wxString& name); bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name); - // Load bitmap or icon resource from file: + // Loads bitmap or icon resource from file: wxBitmap LoadBitmap(const wxString& name); wxIcon LoadIcon(const wxString& name); diff --git a/contrib/src/xml/xmlres.cpp b/contrib/src/xml/xmlres.cpp index b342610629..ee8299df4b 100644 --- a/contrib/src/xml/xmlres.cpp +++ b/contrib/src/xml/xmlres.cpp @@ -54,12 +54,6 @@ wxXmlResource::wxXmlResource(const wxString& filemask, bool use_locale = TRUE) wxXmlResource::~wxXmlResource() { - for (size_t i = 0; i < m_Data.GetCount(); i++) - { - if (!m_Data[i].DocOwned) m_Data[i].Doc = NULL; - // we don't want it to be deleted - } - ClearHandlers(); } @@ -97,7 +91,6 @@ bool wxXmlResource::Load(const wxString& filemask) drec = new wxXmlResourceDataRecord; drec->File = fnd2; m_Data.Add(drec); - drec->DocOwned = TRUE; fnd2 = fs2.FindNext(); } } @@ -106,7 +99,6 @@ bool wxXmlResource::Load(const wxString& filemask) { drec = new wxXmlResourceDataRecord; drec->File = fnd; - drec->DocOwned = TRUE; m_Data.Add(drec); } @@ -268,8 +260,6 @@ void wxXmlResource::UpdateResources() for (size_t i = 0; i < m_Data.GetCount(); i++) { - if (!m_Data[i].DocOwned) continue; - modif = (m_Data[i].Doc == NULL); if (!modif) -- 2.45.2