don't use untyped wxList in wxXmlResource
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -215,13 +215,13 @@ IMPLEMENT_ABSTRACT_CLASS(wxXmlResourceHandler, wxObject)
|
||||
|
||||
void wxXmlResource::AddHandler(wxXmlResourceHandler *handler)
|
||||
{
|
||||
m_handlers.Append(handler);
|
||||
m_handlers.Add(handler);
|
||||
handler->SetParentResource(this);
|
||||
}
|
||||
|
||||
void wxXmlResource::InsertHandler(wxXmlResourceHandler *handler)
|
||||
{
|
||||
m_handlers.Insert(handler);
|
||||
m_handlers.Insert(handler, 0);
|
||||
handler->SetParentResource(this);
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ void wxXmlResource::InsertHandler(wxXmlResourceHandler *handler)
|
||||
|
||||
void wxXmlResource::ClearHandlers()
|
||||
{
|
||||
WX_CLEAR_LIST(wxList, m_handlers);
|
||||
WX_CLEAR_ARRAY(m_handlers);
|
||||
}
|
||||
|
||||
|
||||
@@ -672,26 +672,19 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent,
|
||||
return CreateResFromNode(©, parent, instance);
|
||||
}
|
||||
|
||||
wxXmlResourceHandler *handler;
|
||||
|
||||
if (handlerToUse)
|
||||
{
|
||||
if (handlerToUse->CanHandle(node))
|
||||
{
|
||||
return handlerToUse->CreateResource(node, parent, instance);
|
||||
}
|
||||
}
|
||||
else if (node->GetName() == wxT("object"))
|
||||
{
|
||||
wxList::compatibility_iterator ND = m_handlers.GetFirst();
|
||||
while (ND)
|
||||
for ( wxXmlResourceHandlers::iterator i = m_handlers.begin();
|
||||
i != m_handlers.end(); ++i )
|
||||
{
|
||||
handler = (wxXmlResourceHandler*)ND->GetData();
|
||||
wxXmlResourceHandler *handler = *i;
|
||||
if (handler->CanHandle(node))
|
||||
{
|
||||
return handler->CreateResource(node, parent, instance);
|
||||
}
|
||||
ND = ND->GetNext();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user