mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-10 16:03:15 -04:00
Make ConvertToUnicode void
This commit is contained in:
parent
4df5eecada
commit
2b7f007921
@ -71,20 +71,19 @@ class CWindow;
|
|||||||
|
|
||||||
CWindow* window;
|
CWindow* window;
|
||||||
|
|
||||||
static bool ConvertToUnicode(TDes& dst, const char* src, size_t length) {
|
static void ConvertToUnicode(TDes& dst, const char* src, size_t length) {
|
||||||
if (src) {
|
if (!src) return;
|
||||||
|
|
||||||
cc_unichar* uni = reinterpret_cast <cc_unichar*> (const_cast <TUint16*> (dst.Ptr()));
|
cc_unichar* uni = reinterpret_cast <cc_unichar*> (const_cast <TUint16*> (dst.Ptr()));
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
*uni++ = Convert_CP437ToUnicode(src[i]);
|
*uni++ = Convert_CP437ToUnicode(src[i]);
|
||||||
}
|
}
|
||||||
*uni = '\0';
|
*uni = '\0';
|
||||||
dst.SetLength(length);
|
dst.SetLength(length);
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ConvertToUnicode(TDes& dst, const cc_string* src) {
|
static void ConvertToUnicode(TDes& dst, const cc_string* src) {
|
||||||
return ConvertToUnicode(dst, src->buffer, (size_t)src->length);
|
ConvertToUnicode(dst, src->buffer, (size_t)src->length);
|
||||||
}
|
}
|
||||||
|
|
||||||
class CWindow : public CBase
|
class CWindow : public CBase
|
||||||
|
Loading…
x
Reference in New Issue
Block a user