Make wxXmlNode::GetDepth() parameter const
There is no need to require a non-const pointer here. Closes #24317.
This commit is contained in:
parent
85b04c1c24
commit
63a40637eb
3 changed files with 3 additions and 3 deletions
|
|
@ -132,7 +132,7 @@ public:
|
||||||
const wxString& GetContent() const { return m_content; }
|
const wxString& GetContent() const { return m_content; }
|
||||||
|
|
||||||
bool IsWhitespaceOnly() const;
|
bool IsWhitespaceOnly() const;
|
||||||
int GetDepth(wxXmlNode *grandparent = nullptr) const;
|
int GetDepth(const wxXmlNode *grandparent = nullptr) const;
|
||||||
|
|
||||||
// Gets node content from wxXML_ENTITY_NODE
|
// Gets node content from wxXML_ENTITY_NODE
|
||||||
// The problem is, <tag>content<tag> is represented as
|
// The problem is, <tag>content<tag> is represented as
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ public:
|
||||||
@a grandparent or the @NULL node (which is the parent of non-linked
|
@a grandparent or the @NULL node (which is the parent of non-linked
|
||||||
nodes or the parent of a wxXmlDocument's root element node).
|
nodes or the parent of a wxXmlDocument's root element node).
|
||||||
*/
|
*/
|
||||||
int GetDepth(wxXmlNode* grandparent = nullptr) const;
|
int GetDepth(const wxXmlNode* grandparent = nullptr) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns a flag indicating whether encoding conversion is necessary when saving. The default is @false.
|
Returns a flag indicating whether encoding conversion is necessary when saving. The default is @false.
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ wxString wxXmlNode::GetNodeContent() const
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxXmlNode::GetDepth(wxXmlNode *grandparent) const
|
int wxXmlNode::GetDepth(const wxXmlNode *grandparent) const
|
||||||
{
|
{
|
||||||
const wxXmlNode *n = this;
|
const wxXmlNode *n = this;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue