[Scummvm-cvs-logs] CVS: scummvm/backends/fs/windows windows-fs.cpp,1.24,1.25
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Sun Feb 20 07:34:03 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm sprite_he.cpp,1.2,1.3 sprite_he.h,1.2,1.3
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2 anims.cpp,1.68,1.69 controls.cpp,1.85,1.86 controls.h,1.17,1.18 defs.h,1.14,1.15 function.cpp,1.77,1.78 mouse.cpp,1.66,1.67 mouse.h,1.16,1.17 save_rest.cpp,1.66,1.67 speech.cpp,1.71,1.72 sword2.cpp,1.134,1.135 sword2.h,1.76,1.77
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/backends/fs/windows
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9303
Modified Files:
windows-fs.cpp
Log Message:
Fixed warning, hopefully without breaking anything. (GCC doesn't like
casting from "const char *" to "char *".)
Index: windows-fs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/fs/windows/windows-fs.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- windows-fs.cpp 19 Feb 2005 16:00:22 -0000 1.24
+++ windows-fs.cpp 20 Feb 2005 15:33:14 -0000 1.25
@@ -54,7 +54,7 @@
private:
static char *toAscii(TCHAR *x);
- static TCHAR* toUnicode(char *x);
+ static const TCHAR* toUnicode(const char *x);
static void addFile (FSList &list, ListMode mode, const char *base, WIN32_FIND_DATA* find_data);
};
@@ -70,12 +70,11 @@
#endif
}
-TCHAR* WindowsFilesystemNode::toUnicode(char *x) {
-
+const TCHAR* WindowsFilesystemNode::toUnicode(const char *x) {
#ifndef UNICODE
- return (TCHAR*)x;
+ return (const TCHAR *)x;
#else
- static TCHAR unicodeString[MAX_PATH];
+ static const TCHAR unicodeString[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, x, strlen(x) + 1, unicodeString, sizeof(unicodeString));
return unicodeString;
#endif
@@ -150,7 +149,7 @@
_displayName = String(str + offset, len);
// Check whether it is a directory, and whether the file actually exists
- DWORD fileAttribs = GetFileAttributes(toUnicode((char *)_path.c_str()));
+ DWORD fileAttribs = GetFileAttributes(toUnicode(_path.c_str()));
if (fileAttribs == 0xffffffff) {
_isValid = false;
@@ -199,8 +198,8 @@
else {
// Files enumeration
WIN32_FIND_DATA desc;
- HANDLE handle;
- char searchPath[MAX_PATH + 10];
+ HANDLE handle;
+ char searchPath[MAX_PATH + 10];
sprintf(searchPath, "%s*", _path.c_str());
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm sprite_he.cpp,1.2,1.3 sprite_he.h,1.2,1.3
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2 anims.cpp,1.68,1.69 controls.cpp,1.85,1.86 controls.h,1.17,1.18 defs.h,1.14,1.15 function.cpp,1.77,1.78 mouse.cpp,1.66,1.67 mouse.h,1.16,1.17 save_rest.cpp,1.66,1.67 speech.cpp,1.71,1.72 sword2.cpp,1.134,1.135 sword2.h,1.76,1.77
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list