git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33156
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- if (prop->GetName() == propName) return TRUE;
+ if (prop->GetName() == propName) return true;
prop = prop->GetNext();
}
prop = prop->GetNext();
}
}
bool wxXmlNode::GetPropVal(const wxString& propName, wxString *value) const
}
bool wxXmlNode::GetPropVal(const wxString& propName, wxString *value) const
if (prop->GetName() == propName)
{
*value = prop->GetValue();
if (prop->GetName() == propName)
{
*value = prop->GetValue();
}
prop = prop->GetNext();
}
}
prop = prop->GetNext();
}
}
wxString wxXmlNode::GetPropVal(const wxString& propName, const wxString& defaultVal) const
}
wxString wxXmlNode::GetPropVal(const wxString& propName, const wxString& defaultVal) const
bool wxXmlNode::RemoveChild(wxXmlNode *child)
{
if (m_children == NULL)
bool wxXmlNode::RemoveChild(wxXmlNode *child)
{
if (m_children == NULL)
else if (m_children == child)
{
m_children = child->m_next;
child->m_parent = NULL;
child->m_next = NULL;
else if (m_children == child)
{
m_children = child->m_next;
child->m_parent = NULL;
child->m_next = NULL;
ch->m_next = child->m_next;
child->m_parent = NULL;
child->m_next = NULL;
ch->m_next = child->m_next;
child->m_parent = NULL;
child->m_next = NULL;
wxXmlProperty *prop;
if (m_properties == NULL)
wxXmlProperty *prop;
if (m_properties == NULL)
else if (m_properties->GetName() == name)
{
else if (m_properties->GetName() == name)
{
m_properties = prop->GetNext();
prop->SetNext(NULL);
delete prop;
m_properties = prop->GetNext();
prop->SetNext(NULL);
delete prop;
p->SetNext(prop->GetNext());
prop->SetNext(NULL);
delete prop;
p->SetNext(prop->GetNext());
prop->SetNext(NULL);
delete prop;
for (char *c = buf; *c != '\0'; c++)
if (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\r')
{
for (char *c = buf; *c != '\0'; c++)
if (*c != ' ' && *c != '\t' && *c != '\n' && *c != '\r')
{
- if (!ctx.version.IsEmpty())
+ if (!ctx.version.empty())
- if (!ctx.encoding.IsEmpty())
+ if (!ctx.encoding.empty())
SetFileEncoding(ctx.encoding);
SetRoot(ctx.root);
}
SetFileEncoding(ctx.encoding);
SetRoot(ctx.root);
}
#endif
wxMBConv *convFile)
{
#endif
wxMBConv *convFile)
{
- if (str.IsEmpty()) return;
+ if (str.empty()) return;
#if wxUSE_UNICODE
const wxWX2MBbuf buf(str.mb_str(*(convFile ? convFile : &wxConvUTF8)));
stream.Write((const char*)buf, strlen((const char*)buf));
#if wxUSE_UNICODE
const wxWX2MBbuf buf(str.mb_str(*(convFile ? convFile : &wxConvUTF8)));
stream.Write((const char*)buf, strlen((const char*)buf));
bool wxXmlDocument::Save(wxOutputStream& stream) const
{
if ( !IsOk() )
bool wxXmlDocument::Save(wxOutputStream& stream) const
{
if ( !IsOk() )
- wxMBConv *convMem = NULL, *convFile = NULL;
+ wxMBConv *convMem = NULL;
+
- convFile = new wxCSConv(GetFileEncoding());
+ wxMBConv *convFile = new wxCSConv(GetFileEncoding());
+ wxMBConv *convFile = NULL;
if ( GetFileEncoding() != GetEncoding() )
{
convFile = new wxCSConv(GetFileEncoding());
if ( GetFileEncoding() != GetEncoding() )
{
convFile = new wxCSConv(GetFileEncoding());
if ( convMem )
delete convMem;
if ( convMem )
delete convMem;