cast fix, workaround for pickeir compilers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -473,12 +473,8 @@ size_t wxMBConvUTF7::WC2MB(char *buf, const wchar_t
|
|||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
#ifndef WC_UTF16
|
#ifndef WC_UTF16
|
||||||
#ifdef __VMS
|
else if (((wxUint16)cc) > 0xffff)
|
||||||
else if (cc > 0xffff)
|
{
|
||||||
#else
|
|
||||||
else if (cc > ((const wchar_t)0xffff))
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
// no surrogate pair generation (yet?)
|
// no surrogate pair generation (yet?)
|
||||||
return (size_t)-1;
|
return (size_t)-1;
|
||||||
}
|
}
|
||||||
|
@@ -1409,12 +1409,12 @@ const wxCharBuffer wxString::ToAscii() const
|
|||||||
wxCharBuffer buffer(length());
|
wxCharBuffer buffer(length());
|
||||||
|
|
||||||
|
|
||||||
wxInt8 *dest = buffer.data();
|
char *dest = buffer.data();
|
||||||
|
|
||||||
const wchar_t *pwc = c_str();
|
const wchar_t *pwc = c_str();
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
*dest++ = (wxInt8)(*pwc > SCHAR_MAX ? wxT('_') : *pwc);
|
*dest++ = (char)(*pwc > SCHAR_MAX ? wxT('_') : *pwc);
|
||||||
|
|
||||||
// the output string can't have embedded NULs anyhow, so we can safely
|
// the output string can't have embedded NULs anyhow, so we can safely
|
||||||
// stop at first of them even if we do have any
|
// stop at first of them even if we do have any
|
||||||
|
Reference in New Issue
Block a user