Initialize wxXmlDocument::m_fileType and m_eol in declaration
This is simpler and more clear than calling SetFileType() from all ctors. Also m_eol
This commit is contained in:
parent
7f6d85d60b
commit
08ef52671f
2 changed files with 2 additions and 7 deletions
|
|
@ -284,8 +284,8 @@ private:
|
|||
wxString m_fileEncoding;
|
||||
wxXmlDoctype m_doctype;
|
||||
wxXmlNode *m_docNode;
|
||||
wxTextFileType m_fileType;
|
||||
wxString m_eol;
|
||||
wxTextFileType m_fileType = wxTextFileType_Unix;
|
||||
wxString m_eol = wxS("\n");
|
||||
|
||||
void DoCopy(const wxXmlDocument& doc);
|
||||
|
||||
|
|
|
|||
|
|
@ -442,14 +442,11 @@ bool wxXmlDoctype::IsValid() const
|
|||
wxXmlDocument::wxXmlDocument()
|
||||
: m_version(wxS("1.0")), m_fileEncoding(wxS("UTF-8")), m_docNode(nullptr)
|
||||
{
|
||||
SetFileType(wxTextFileType_Unix);
|
||||
}
|
||||
|
||||
wxXmlDocument::wxXmlDocument(const wxString& filename, const wxString& encoding)
|
||||
:wxObject(), m_docNode(nullptr)
|
||||
{
|
||||
SetFileType(wxTextFileType_Unix);
|
||||
|
||||
if ( !Load(filename, encoding) )
|
||||
{
|
||||
wxDELETE(m_docNode);
|
||||
|
|
@ -459,8 +456,6 @@ wxXmlDocument::wxXmlDocument(const wxString& filename, const wxString& encoding)
|
|||
wxXmlDocument::wxXmlDocument(wxInputStream& stream, const wxString& encoding)
|
||||
:wxObject(), m_docNode(nullptr)
|
||||
{
|
||||
SetFileType(wxTextFileType_Unix);
|
||||
|
||||
if ( !Load(stream, encoding) )
|
||||
{
|
||||
wxDELETE(m_docNode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue