Added wxString::FromAscii() for char
Used it in protocol.cpp which probably assumes ASCII anyway. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -755,6 +755,16 @@ wxString wxString::FromAscii(const char *ascii)
|
||||
return res;
|
||||
}
|
||||
|
||||
wxString wxString::FromAscii(const char ascii)
|
||||
{
|
||||
// What do we do with '\0' ?
|
||||
|
||||
wxString res;
|
||||
res += (wchar_t)(unsigned char) ascii;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
const wxCharBuffer wxString::ToAscii() const
|
||||
{
|
||||
// this will allocate enough space for the terminating NUL too
|
||||
|
Reference in New Issue
Block a user