X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ebf0700dda1c199f5227d91311a0279ef54d0f86..da3f3e049a3bcd9db16d73dd83c007e12f6c95e1:/src/xml/xml.cpp diff --git a/src/xml/xml.cpp b/src/xml/xml.cpp index 755f7e5656..80c76829fc 100644 --- a/src/xml/xml.cpp +++ b/src/xml/xml.cpp @@ -156,8 +156,8 @@ wxString wxXmlNode::GetPropVal(const wxString& propName, const wxString& default wxString tmp; if (GetPropVal(propName, &tmp)) return tmp; - else - return defaultVal; + + return defaultVal; } void wxXmlNode::AddChild(wxXmlNode *child) @@ -370,7 +370,7 @@ inline static wxString CharToString(wxMBConv *conv, return str; } else - return wxString(s, len); + return wxString(s, len != wxSTRING_MAXLEN ? len : strlen(s)); #endif } @@ -584,7 +584,12 @@ bool wxXmlDocument::Load(wxInputStream& stream, const wxString& encoding) // write string to output: inline static void OutputString(wxOutputStream& stream, const wxString& str, - wxMBConv *convMem, wxMBConv *convFile) +#if wxUSE_UNICODE + wxMBConv * WXUNUSED(convMem), +#else + wxMBConv *convMem, +#endif + wxMBConv *convFile) { if (str.IsEmpty()) return; #if wxUSE_UNICODE