Skip to content

Commit

Permalink
Clarify comments for xml_*::empty()
Browse files Browse the repository at this point in the history
"empty" can be mistaken for "has no children" in case of xml_node in
particular; we now use both empty and null in the comment in hopes that
it may help.
  • Loading branch information
zeux committed May 29, 2024
1 parent 7c66cf7 commit ac0ef85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pugixml.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ namespace pugi
bool operator<=(const xml_attribute& r) const;
bool operator>=(const xml_attribute& r) const;

// Check if attribute is empty
// Check if attribute is empty (null)
bool empty() const;

// Get attribute name/value, or "" if attribute is empty
Expand Down Expand Up @@ -507,7 +507,7 @@ namespace pugi
bool operator<=(const xml_node& r) const;
bool operator>=(const xml_node& r) const;

// Check if node is empty.
// Check if node is empty (null)
bool empty() const;

// Get node type
Expand Down Expand Up @@ -764,7 +764,7 @@ namespace pugi
// Borland C++ workaround
bool operator!() const;

// Check if text object is empty
// Check if text object is empty (null)
bool empty() const;

// Get text, or "" if object is empty
Expand Down

0 comments on commit ac0ef85

Please sign in to comment.