Use U8String/U16String/WString instead of UTF8String/UTF16String/WideString
This commit is contained in:
parent
8ed1f41a50
commit
aa7abe4763
@ -88,7 +88,7 @@ namespace hgl
|
|||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnsiString ToAnsiString(const CharSet &cs,const UTF16String &str)
|
AnsiString ToAnsiString(const CharSet &cs,const U16String &str)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
char *ansi_str;
|
char *ansi_str;
|
||||||
|
@ -63,7 +63,7 @@ namespace hgl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_PROBLEM(U16_TEXT("Get <")+UTF16String(path_name)+U16_TEXT("> info failed!Windows error code: ")+UTF16String::numberOf((uint)GetLastError()));
|
LOG_PROBLEM(U16_TEXT("Get <")+U16String(path_name)+U16_TEXT("> info failed!Windows error code: ")+U16String::numberOf((uint)GetLastError()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(GetDiskFreeSpaceExW(path_name,
|
if(GetDiskFreeSpaceExW(path_name,
|
||||||
@ -75,7 +75,7 @@ namespace hgl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_PROBLEM(U16_TEXT("Get disk free space <")+UTF16String(path_name)+U16_TEXT("> data failed,Windows error code: ")+UTF16String::numberOf((uint)GetLastError()));
|
LOG_PROBLEM(U16_TEXT("Get disk free space <")+U16String(path_name)+U16_TEXT("> data failed,Windows error code: ")+U16String::numberOf((uint)GetLastError()));
|
||||||
}
|
}
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
@ -43,7 +43,7 @@ namespace hgl
|
|||||||
FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,nullptr,dw,
|
FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,nullptr,dw,
|
||||||
MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),str,0,nullptr);
|
MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),str,0,nullptr);
|
||||||
|
|
||||||
LOG_ERROR(L"LoadModule <"+UTF16String(name)+L"> error! os info: "+UTF16String::numberOf(dw)+UTF16String::charOf(L',')+str);
|
LOG_ERROR(L"LoadModule <"+U16String(name)+L"> error! os info: "+U16String::numberOf(dw)+U16String::charOf(L',')+str);
|
||||||
|
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ namespace hgl
|
|||||||
console_handle=GetStdHandle(STD_OUTPUT_HANDLE);
|
console_handle=GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(const UTF16String &)
|
bool Create(const U16String &)
|
||||||
{
|
{
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace hgl
|
|||||||
{
|
{
|
||||||
class LogWinDialog:public Logger
|
class LogWinDialog:public Logger
|
||||||
{
|
{
|
||||||
UTF16String name;
|
U16String name;
|
||||||
|
|
||||||
u16char buf[4096]{};
|
u16char buf[4096]{};
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ namespace hgl
|
|||||||
name=n;
|
name=n;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(const UTF16String &)
|
bool Create(const U16String &)
|
||||||
{
|
{
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
@ -171,8 +171,8 @@ namespace hgl
|
|||||||
|
|
||||||
::GetKeyNameTextW(key,name,64);
|
::GetKeyNameTextW(key,name,64);
|
||||||
|
|
||||||
LOG_INFO(WideString(L"Unknow Key: " )+WideString::numberOf(key)
|
LOG_INFO(WString(L"Unknow Key: " )+WString::numberOf(key)
|
||||||
+WideString(L" ,name: " )+WideString(name));
|
+WString(L" ,name: " )+WString(name));
|
||||||
}
|
}
|
||||||
#endif _DEBUG
|
#endif _DEBUG
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ namespace hgl
|
|||||||
return ::WaitMessage();
|
return ::WaitMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
Window *CreateRenderWindow(const WideString& win_name)
|
Window *CreateRenderWindow(const WString& win_name)
|
||||||
{
|
{
|
||||||
return(new WinWindow(win_name));
|
return(new WinWindow(win_name));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user