This function (and the related DoReportError()) doesn't need to modify its
"context" argument so take a const-pointer in it.
See #11431.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66058
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
protected:
// reports input error at position 'context'
protected:
// reports input error at position 'context'
- void ReportError(wxXmlNode *context, const wxString& message);
+ void ReportError(const wxXmlNode *context, const wxString& message);
// override this in derived class to customize errors reporting
// override this in derived class to customize errors reporting
- virtual void DoReportError(const wxString& xrcFile, wxXmlNode *position,
+ virtual void DoReportError(const wxString& xrcFile, const wxXmlNode *position,
const wxString& message);
// Scans the resources list for unloaded files and loads them. Also reloads
const wxString& message);
// Scans the resources list for unloaded files and loads them. Also reloads
@see wxXmlResourceHandler::ReportError(), DoReportError()
*/
@see wxXmlResourceHandler::ReportError(), DoReportError()
*/
- void ReportError(wxXmlNode *context, const wxString& message);
+ void ReportError(const wxXmlNode *context, const wxString& message);
/**
Implementation of XRC resources errors reporting.
/**
Implementation of XRC resources errors reporting.
- virtual void DoReportError(const wxString& xrcFile, wxXmlNode *position,
+ virtual void DoReportError(const wxString& xrcFile, const wxXmlNode *position,
const wxString& message);
};
const wxString& message);
};
// helper to get filename corresponding to an XML node
wxString
// helper to get filename corresponding to an XML node
wxString
-GetFileNameFromNode(wxXmlNode *node, const wxXmlResourceDataRecords& files)
+GetFileNameFromNode(const wxXmlNode *node, const wxXmlResourceDataRecords& files)
{
// this loop does two things: it looks for ATTR_INPUT_FILENAME among
// parents and if it isn't used, it finds the root of the XML tree 'node'
{
// this loop does two things: it looks for ATTR_INPUT_FILENAME among
// parents and if it isn't used, it finds the root of the XML tree 'node'
m_resource->ReportError(GetParamNode(param), message);
}
m_resource->ReportError(GetParamNode(param), message);
}
-void wxXmlResource::ReportError(wxXmlNode *context, const wxString& message)
+void wxXmlResource::ReportError(const wxXmlNode *context, const wxString& message)
DoReportError(filename, context, message);
}
DoReportError(filename, context, message);
}
-void wxXmlResource::DoReportError(const wxString& xrcFile, wxXmlNode *position,
+void wxXmlResource::DoReportError(const wxString& xrcFile, const wxXmlNode *position,
const wxString& message)
{
const int line = position ? position->GetLineNumber() : -1;
const wxString& message)
{
const int line = position ? position->GetLineNumber() : -1;