diff options
author | Vicent Marti | 2008-09-29 21:44:07 +0000 |
---|---|---|
committer | Vicent Marti | 2008-09-29 21:44:07 +0000 |
commit | b15a6a9a152ce9e056c72f62d8299c982884f15b (patch) | |
tree | 6f7712ea475481901d3fe3b72c761d64d24aa7bb /common | |
parent | 60ad4bd0d94321cdd78bcf79a507981f17d6ee43 (diff) | |
download | scummvm-rg350-b15a6a9a152ce9e056c72f62d8299c982884f15b.tar.gz scummvm-rg350-b15a6a9a152ce9e056c72f62d8299c982884f15b.tar.bz2 scummvm-rg350-b15a6a9a152ce9e056c72f62d8299c982884f15b.zip |
Removed unnecessary unzOpenFile() calls in getAllNames()
svn-id: r34690
Diffstat (limited to 'common')
-rw-r--r-- | common/unzip.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/common/unzip.cpp b/common/unzip.cpp index 27001519a1..bdba2a544a 100644 --- a/common/unzip.cpp +++ b/common/unzip.cpp @@ -1399,17 +1399,12 @@ int ZipArchive::getAllNames(Common::StringList &list) { if (unzGoToFirstFile(_zipFile) != UNZ_OK) return 0; - char fileNameBuffer[UNZ_MAXFILENAMEINZIP+1]; + char fileNameBuffer[UNZ_MAXFILENAMEINZIP + 1]; list.clear(); do { - unzOpenCurrentFile(_zipFile); - unzGetCurrentFileInfo(_zipFile, 0, fileNameBuffer, UNZ_MAXFILENAMEINZIP+1, 0, 0, 0, 0); - + unzGetCurrentFileInfo(_zipFile, 0, fileNameBuffer, UNZ_MAXFILENAMEINZIP + 1, 0, 0, 0, 0); list.push_back(Common::String(fileNameBuffer)); - - unzCloseCurrentFile(_zipFile); - } while (unzGoToNextFile(_zipFile) == UNZ_OK); return list.size(); |