diff --git a/include/wx/xml/xml.h b/include/wx/xml/xml.h index 67fe18bf7c..023337ce33 100644 --- a/include/wx/xml/xml.h +++ b/include/wx/xml/xml.h @@ -132,7 +132,7 @@ public: const wxString& GetContent() const { return m_content; } bool IsWhitespaceOnly() const; - int GetDepth(wxXmlNode *grandparent = nullptr) const; + int GetDepth(const wxXmlNode *grandparent = nullptr) const; // Gets node content from wxXML_ENTITY_NODE // The problem is, content is represented as diff --git a/interface/wx/xml/xml.h b/interface/wx/xml/xml.h index 6477391cc9..d2afbe3e5f 100644 --- a/interface/wx/xml/xml.h +++ b/interface/wx/xml/xml.h @@ -203,7 +203,7 @@ public: @a grandparent or the @NULL node (which is the parent of non-linked 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. diff --git a/src/xml/xml.cpp b/src/xml/xml.cpp index bd1c64526b..d8e4ae5199 100644 --- a/src/xml/xml.cpp +++ b/src/xml/xml.cpp @@ -361,7 +361,7 @@ wxString wxXmlNode::GetNodeContent() const return wxEmptyString; } -int wxXmlNode::GetDepth(wxXmlNode *grandparent) const +int wxXmlNode::GetDepth(const wxXmlNode *grandparent) const { const wxXmlNode *n = this; int ret = -1;