diff options
author | Max Horn | 2011-06-09 18:16:39 +0200 |
---|---|---|
committer | Max Horn | 2011-06-10 22:15:39 +0200 |
commit | 252a505db2660ac1b022818f9883a8ba7e2dd405 (patch) | |
tree | 5b7b816617b808aac386ea74199b94abb01f8021 /engines | |
parent | 55e1b08e22b737f6a64ae0505b4bdd190c9e08eb (diff) | |
download | scummvm-rg350-252a505db2660ac1b022818f9883a8ba7e2dd405.tar.gz scummvm-rg350-252a505db2660ac1b022818f9883a8ba7e2dd405.tar.bz2 scummvm-rg350-252a505db2660ac1b022818f9883a8ba7e2dd405.zip |
DETECTOR: Allocate MacResManager on the stack
Diffstat (limited to 'engines')
-rw-r--r-- | engines/advancedDetector.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index 2ee32b2f86..d81906eda6 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -456,16 +456,14 @@ static ADGameDescList detectGame(const Common::FSList &fslist, const ADParams &p // file and as one with resource fork. if (g->flags & ADGF_MACRESFORK) { - Common::MacResManager *macResMan = new Common::MacResManager(); + Common::MacResManager macResMan; - if (macResMan->open(parent, fname)) { - tmp.md5 = macResMan->computeResForkMD5AsString(params.md5Bytes); - tmp.size = macResMan->getResForkDataSize(); + if (macResMan.open(parent, fname)) { + tmp.md5 = macResMan.computeResForkMD5AsString(params.md5Bytes); + tmp.size = macResMan.getResForkDataSize(); debug(3, "> '%s': '%s'", fname.c_str(), tmp.md5.c_str()); filesSizeMD5[fname] = tmp; } - - delete macResMan; } else { if (allFiles.contains(fname)) { debug(3, "+ %s", fname.c_str()); |