]> git.saurik.com Git - wxWidgets.git/commitdiff
cast fix, workaround for pickeir compilers
authorRyan Norton <wxprojects@comcast.net>
Fri, 5 Nov 2004 16:33:47 +0000 (16:33 +0000)
committerRyan Norton <wxprojects@comcast.net>
Fri, 5 Nov 2004 16:33:47 +0000 (16:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/strconv.cpp
src/common/string.cpp

index c75888b96007282a24a54b063cf75503cb8f2c1d..88c3c6ca79a48a21f0e4261e11139539a187c5ff 100644 (file)
@@ -473,12 +473,8 @@ size_t wxMBConvUTF7::WC2MB(char *buf, const wchar_t
             len++;
         }
 #ifndef WC_UTF16
-#ifdef __VMS
-       else if (cc > 0xffff)
-#else
-       else if (cc > ((const wchar_t)0xffff))
-#endif
-        {
+        else if (((wxUint16)cc) > 0xffff)
+           {
             // no surrogate pair generation (yet?)
             return (size_t)-1;
         }
index f7fac212413320db2673da5c5fef2034fe5995c5..0eae6299c973bd7dae141f2e55919ca3363a942e 100644 (file)
@@ -1409,12 +1409,12 @@ const wxCharBuffer wxString::ToAscii() const
     wxCharBuffer buffer(length());
 
 
-    wxInt8 *dest = buffer.data();
+    char *dest = buffer.data();
 
     const wchar_t *pwc = c_str();
     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
         // stop at first of them even if we do have any