From b15a6a9a152ce9e056c72f62d8299c982884f15b Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Mon, 29 Sep 2008 21:44:07 +0000 Subject: Removed unnecessary unzOpenFile() calls in getAllNames() svn-id: r34690 --- common/unzip.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'common/unzip.cpp') 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(); -- cgit v1.2.3