Fix warning
svn-id: r5705
This commit is contained in:
parent
7b39515203
commit
efd0ef1e79
1 changed files with 3 additions and 3 deletions
|
@ -61,22 +61,22 @@ private:
|
||||||
|
|
||||||
|
|
||||||
char* WindowsFilesystemNode::toAscii(TCHAR *x) {
|
char* WindowsFilesystemNode::toAscii(TCHAR *x) {
|
||||||
static char asciiString[MAX_PATH];
|
|
||||||
|
|
||||||
#ifndef UNICODE
|
#ifndef UNICODE
|
||||||
return (char*)x;
|
return (char*)x;
|
||||||
#else
|
#else
|
||||||
|
static char asciiString[MAX_PATH];
|
||||||
WideCharToMultiByte(CP_ACP, 0, x, _tcslen(x) + 1, asciiString, sizeof(asciiString), NULL, NULL);
|
WideCharToMultiByte(CP_ACP, 0, x, _tcslen(x) + 1, asciiString, sizeof(asciiString), NULL, NULL);
|
||||||
return asciiString;
|
return asciiString;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TCHAR* WindowsFilesystemNode::toUnicode(char *x) {
|
TCHAR* WindowsFilesystemNode::toUnicode(char *x) {
|
||||||
static TCHAR unicodeString[MAX_PATH];
|
|
||||||
|
|
||||||
#ifndef UNICODE
|
#ifndef UNICODE
|
||||||
return (TCHAR*)x;
|
return (TCHAR*)x;
|
||||||
#else
|
#else
|
||||||
|
static TCHAR unicodeString[MAX_PATH];
|
||||||
MultiByteToWideChar(CP_ACP, 0, x, strlen(x) + 1, unicodeString, sizeof(unicodeString));
|
MultiByteToWideChar(CP_ACP, 0, x, strlen(x) + 1, unicodeString, sizeof(unicodeString));
|
||||||
return unicodeString;
|
return unicodeString;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue