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) {
|
||||
static char asciiString[MAX_PATH];
|
||||
|
||||
#ifndef UNICODE
|
||||
return (char*)x;
|
||||
#else
|
||||
#else
|
||||
static char asciiString[MAX_PATH];
|
||||
WideCharToMultiByte(CP_ACP, 0, x, _tcslen(x) + 1, asciiString, sizeof(asciiString), NULL, NULL);
|
||||
return asciiString;
|
||||
#endif
|
||||
}
|
||||
|
||||
TCHAR* WindowsFilesystemNode::toUnicode(char *x) {
|
||||
static TCHAR unicodeString[MAX_PATH];
|
||||
|
||||
#ifndef UNICODE
|
||||
return (TCHAR*)x;
|
||||
#else
|
||||
static TCHAR unicodeString[MAX_PATH];
|
||||
MultiByteToWideChar(CP_ACP, 0, x, strlen(x) + 1, unicodeString, sizeof(unicodeString));
|
||||
return unicodeString;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue