X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e14d10b039e68a701a447043a4031cf43e9fa90b..6ee3c06421446908fabe9de45b8e0c7519c28c24:/contrib/src/stc/PlatWX.cpp?ds=sidebyside diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index eb21c76bb2..98eba98548 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -481,7 +481,7 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positio // so figure it out and fix it! i = 0; size_t ui = 0; - while (i < len) { + while ((int)i < len) { unsigned char uch = (unsigned char)s[i]; positions[i++] = tpos[ui]; if (uch >= 0x80) { @@ -1223,6 +1223,22 @@ double ElapsedTime::Duration(bool reset) { //---------------------------------------------------------------------- +#if wxUSE_UNICODE +wxString stc2wx(const char* str, size_t len) +{ + char *buffer=new char[len+1]; + strncpy(buffer, str, len); + buffer[len]=0; + + wxString cstr(buffer, wxConvUTF8); + + delete[] buffer; + return cstr; +} +#endif + + +