Minor cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -256,12 +256,14 @@ void wxXmlNode::AddProperty(wxXmlProperty *prop)
|
|||||||
|
|
||||||
bool wxXmlNode::DeleteProperty(const wxString& name)
|
bool wxXmlNode::DeleteProperty(const wxString& name)
|
||||||
{
|
{
|
||||||
|
wxXmlProperty *prop;
|
||||||
|
|
||||||
if (m_properties == NULL)
|
if (m_properties == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
else if (m_properties->GetName() == name)
|
else if (m_properties->GetName() == name)
|
||||||
{
|
{
|
||||||
wxXmlProperty *prop = m_properties;
|
prop = m_properties;
|
||||||
m_properties = prop->GetNext();
|
m_properties = prop->GetNext();
|
||||||
prop->SetNext(NULL);
|
prop->SetNext(NULL);
|
||||||
delete prop;
|
delete prop;
|
||||||
@@ -275,7 +277,7 @@ bool wxXmlNode::DeleteProperty(const wxString& name)
|
|||||||
{
|
{
|
||||||
if (p->GetNext()->GetName() == name)
|
if (p->GetNext()->GetName() == name)
|
||||||
{
|
{
|
||||||
wxXmlProperty *prop = p->GetNext();
|
prop = p->GetNext();
|
||||||
p->SetNext(prop->GetNext());
|
p->SetNext(prop->GetNext());
|
||||||
prop->SetNext(NULL);
|
prop->SetNext(NULL);
|
||||||
delete prop;
|
delete prop;
|
||||||
|
@@ -256,12 +256,14 @@ void wxXmlNode::AddProperty(wxXmlProperty *prop)
|
|||||||
|
|
||||||
bool wxXmlNode::DeleteProperty(const wxString& name)
|
bool wxXmlNode::DeleteProperty(const wxString& name)
|
||||||
{
|
{
|
||||||
|
wxXmlProperty *prop;
|
||||||
|
|
||||||
if (m_properties == NULL)
|
if (m_properties == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
else if (m_properties->GetName() == name)
|
else if (m_properties->GetName() == name)
|
||||||
{
|
{
|
||||||
wxXmlProperty *prop = m_properties;
|
prop = m_properties;
|
||||||
m_properties = prop->GetNext();
|
m_properties = prop->GetNext();
|
||||||
prop->SetNext(NULL);
|
prop->SetNext(NULL);
|
||||||
delete prop;
|
delete prop;
|
||||||
@@ -275,7 +277,7 @@ bool wxXmlNode::DeleteProperty(const wxString& name)
|
|||||||
{
|
{
|
||||||
if (p->GetNext()->GetName() == name)
|
if (p->GetNext()->GetName() == name)
|
||||||
{
|
{
|
||||||
wxXmlProperty *prop = p->GetNext();
|
prop = p->GetNext();
|
||||||
p->SetNext(prop->GetNext());
|
p->SetNext(prop->GetNext());
|
||||||
prop->SetNext(NULL);
|
prop->SetNext(NULL);
|
||||||
delete prop;
|
delete prop;
|
||||||
|
Reference in New Issue
Block a user