diff options
author | Paweł Kołodziejski | 2003-03-06 16:27:06 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-03-06 16:27:06 +0000 |
commit | 6ce098172f3754a2c279e1e2d156f3354c612011 (patch) | |
tree | 5d55422c648e93f4b78e49c303ec1978819b3fa4 /common/file.cpp | |
parent | 38e926cee3ec4a5066d41c0dc95231e156543b64 (diff) | |
download | scummvm-rg350-6ce098172f3754a2c279e1e2d156f3354c612011.tar.gz scummvm-rg350-6ce098172f3754a2c279e1e2d156f3354c612011.tar.bz2 scummvm-rg350-6ce098172f3754a2c279e1e2d156f3354c612011.zip |
next pedantic cleanup code
svn-id: r6714
Diffstat (limited to 'common/file.cpp')
-rw-r--r-- | common/file.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/file.cpp b/common/file.cpp index 64b67c5632..b678acd356 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -56,7 +56,7 @@ FILE *File::fopenNoCase(const char *filename, const char *directory, const char strcpy(buf, directory); if (directory[0] != 0) { #ifdef __MORPHOS__ - if (buf[strlen(buf)-1] != ':' && buf[strlen(buf)-1] != '/') + if (buf[strlen(buf) - 1] != ':' && buf[strlen(buf) - 1] != '/') #endif strcat(buf, "/"); } @@ -97,7 +97,6 @@ File::~File() { } bool File::open(const char *filename, const char *directory, int mode, byte encbyte) { - if (_handle) { debug(2, "File %s already opened", filename); return false; @@ -127,7 +126,7 @@ bool File::open(const char *filename, const char *directory, int mode, byte encb } _encbyte = encbyte; - + int len = strlen(filename); _name = new char[len+1]; memcpy(_name, filename, len+1); @@ -181,7 +180,7 @@ uint32 File::size() { fseek(_handle, 0, SEEK_END); uint32 length = ftell(_handle); fseek(_handle, oldPos, SEEK_SET); - + return length; } |