fixes for STL build without implicit wxString->char* conversion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,7 +40,7 @@ IMPLEMENT_CLASS(wxXmlDocument, wxObject)
|
|||||||
|
|
||||||
|
|
||||||
// a private utility used by wxXML
|
// a private utility used by wxXML
|
||||||
static bool wxIsWhiteOnly(const wxChar *buf);
|
static bool wxIsWhiteOnly(const wxString& buf);
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -438,11 +438,14 @@ static wxString CharToString(wxMBConv *conv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// returns true if the given string contains only whitespaces
|
// returns true if the given string contains only whitespaces
|
||||||
bool wxIsWhiteOnly(const wxChar *buf)
|
bool wxIsWhiteOnly(const wxString& buf)
|
||||||
{
|
{
|
||||||
for (const wxChar *c = buf; *c != wxT('\0'); c++)
|
for ( wxString::const_iterator i = buf.begin(); i != buf.end(); ++i )
|
||||||
if (*c != wxT(' ') && *c != wxT('\t') && *c != wxT('\n') && *c != wxT('\r'))
|
{
|
||||||
|
wxChar c = *i;
|
||||||
|
if ( c != wxT(' ') && c != wxT('\t') && c != wxT('\n') && c != wxT('\r'))
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,8 +576,7 @@ static int UnknownEncodingHnd(void * WXUNUSED(encodingHandlerData),
|
|||||||
// We must build conversion table for expat. The easiest way to do so
|
// We must build conversion table for expat. The easiest way to do so
|
||||||
// is to let wxCSConv convert as string containing all characters to
|
// is to let wxCSConv convert as string containing all characters to
|
||||||
// wide character representation:
|
// wide character representation:
|
||||||
wxString str(name, wxConvLibc);
|
wxCSConv conv(name);
|
||||||
wxCSConv conv(str);
|
|
||||||
char mbBuf[2];
|
char mbBuf[2];
|
||||||
wchar_t wcBuf[10];
|
wchar_t wcBuf[10];
|
||||||
size_t i;
|
size_t i;
|
||||||
|
Reference in New Issue
Block a user