diff options
author | Einar Johan Trøan Sømåen | 2012-07-25 18:38:13 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-25 18:38:13 +0200 |
commit | 46968e20f944810cb3b9bce1fdf5f61a7f1de0bb (patch) | |
tree | 104972737f803583f6c147dc4e8d015713ee9d8c /engines/wintermute | |
parent | 45c5eb5cab069ea9ca4302a637f4621d460c790d (diff) | |
download | scummvm-rg350-46968e20f944810cb3b9bce1fdf5f61a7f1de0bb.tar.gz scummvm-rg350-46968e20f944810cb3b9bce1fdf5f61a7f1de0bb.tar.bz2 scummvm-rg350-46968e20f944810cb3b9bce1fdf5f61a7f1de0bb.zip |
WINTERMUTE: Cleanup in BasePackage.
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/base/file/base_package.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/engines/wintermute/base/file/base_package.cpp b/engines/wintermute/base/file/base_package.cpp index 6987cad3e6..90bb027042 100644 --- a/engines/wintermute/base/file/base_package.cpp +++ b/engines/wintermute/base/file/base_package.cpp @@ -138,8 +138,7 @@ PackageSet::PackageSet(Common::FSNode file, const Common::String &filename, bool if (!hdr._masterIndex) pkg->_cd = 0; // override CD to fixed disk
_packages.push_back(pkg);
-
-
+
// read file entries
uint32 numFiles = stream->readUint32LE();
@@ -158,10 +157,6 @@ PackageSet::PackageSet(Common::FSNode file, const Common::String &filename, bool }
}
debugC(kWinterMuteDebugFileAccess, "Package contains %s", name);
- warning( "Package contains %s", name);
- // some old version of ProjectMan writes invalid directory entries
- // so at least prevent strupr from corrupting memory
- name[nameLength - 1] = '\0';
Common::String upcName = name;
upcName.toUppercase();
@@ -178,7 +173,7 @@ PackageSet::PackageSet(Common::FSNode file, const Common::String &filename, bool timeDate1 = stream->readUint32LE();
timeDate2 = stream->readUint32LE();
}
- _filesIter = _files.find(upcName.c_str());
+ _filesIter = _files.find(upcName);
if (_filesIter == _files.end()) {
BaseFileEntry *fileEntry = new BaseFileEntry();
fileEntry->_package = pkg;
@@ -187,7 +182,7 @@ PackageSet::PackageSet(Common::FSNode file, const Common::String &filename, bool fileEntry->_compressedLength = compLength;
fileEntry->_flags = flags;
- _files[upcName.c_str()] = Common::ArchiveMemberPtr(fileEntry);
+ _files[upcName] = Common::ArchiveMemberPtr(fileEntry);
} else {
// current package has higher priority than the registered
// TODO: This cast might be a bit ugly.
|