Skip to content

Commit

Permalink
Use nullptr instead of NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Feb 1, 2025
1 parent 231b9c9 commit 4742cd0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CodeLite/xmlutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
wxXmlNode* XmlUtils::FindNodeByName(const wxXmlNode* parent, const wxString& tagName, const wxString& name)
{
if(!parent) {
return NULL;
return nullptr;
}

wxXmlNode* child = parent->GetChildren();
Expand All @@ -40,13 +40,13 @@ wxXmlNode* XmlUtils::FindNodeByName(const wxXmlNode* parent, const wxString& tag
}
child = child->GetNext();
}
return NULL;
return nullptr;
}

wxXmlNode* XmlUtils::FindFirstByTagName(const wxXmlNode* parent, const wxString& tagName)
{
if(!parent) {
return NULL;
return nullptr;
}

wxXmlNode* child = parent->GetChildren();
Expand All @@ -56,12 +56,12 @@ wxXmlNode* XmlUtils::FindFirstByTagName(const wxXmlNode* parent, const wxString&
}
child = child->GetNext();
}
return NULL;
return nullptr;
}

wxXmlNode* XmlUtils::FindLastByTagName(const wxXmlNode* parent, const wxString& tagName)
{
wxXmlNode* last_node = NULL;
wxXmlNode* last_node = nullptr;
wxXmlNode* child = parent->GetChildren();
while(child) {
if(child->GetName() == tagName) {
Expand Down Expand Up @@ -211,7 +211,7 @@ wxString XmlUtils::ChildNodesContentToString(const wxXmlNode* node, const wxStri
void XmlUtils::SetNodeContent(wxXmlNode* node, const wxString& text)
{
wxXmlNode* n = node->GetChildren();
wxXmlNode* contentNode = NULL;
wxXmlNode* contentNode = nullptr;
while(n) {
if(n->GetType() == wxXML_TEXT_NODE || n->GetType() == wxXML_CDATA_SECTION_NODE) {
contentNode = n;
Expand Down Expand Up @@ -246,7 +246,7 @@ void XmlUtils::RemoveChildren(wxXmlNode* node)
void XmlUtils::SetCDATANodeContent(wxXmlNode* node, const wxString& text)
{
wxXmlNode* n = node->GetChildren();
wxXmlNode* contentNode = NULL;
wxXmlNode* contentNode = nullptr;
while(n) {
if(n->GetType() == wxXML_TEXT_NODE || n->GetType() == wxXML_CDATA_SECTION_NODE) {
contentNode = n;
Expand Down Expand Up @@ -304,7 +304,7 @@ bool XmlUtils::StaticWriteObject(wxXmlNode* root, const wxString& name, Serializ
}

// create new xml node for this object
child = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("ArchiveObject"));
child = new wxXmlNode(nullptr, wxXML_ELEMENT_NODE, wxT("ArchiveObject"));
root->AddChild(child);

wxString objectVersion = obj->GetVersion();
Expand Down

0 comments on commit 4742cd0

Please sign in to comment.