mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug 1337358 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in modules/libjar/ r=froydnj
MozReview-Commit-ID: AZtieJz44uD --HG-- extra : rebase_source : bd63fbebce66a2f5553f702b01b1cece1c77280c
This commit is contained in:
parent
bd96269239
commit
2ca789788b
@ -407,8 +407,8 @@ nsresult nsZipArchive::Test(const char *aEntryName)
|
||||
}
|
||||
|
||||
// test all items in archive
|
||||
for (int i = 0; i < ZIP_TABSIZE; i++) {
|
||||
for (currItem = mFiles[i]; currItem; currItem = currItem->next) {
|
||||
for (auto* item : mFiles) {
|
||||
for (currItem = item; currItem; currItem = currItem->next) {
|
||||
//-- don't test (synthetic) directory items
|
||||
if (currItem->IsDirectory())
|
||||
continue;
|
||||
@ -802,13 +802,13 @@ nsresult nsZipArchive::BuildSynthetics()
|
||||
MOZ_WIN_MEM_TRY_BEGIN
|
||||
// Create synthetic entries for any missing directories.
|
||||
// Do this when all ziptable has scanned to prevent double entries.
|
||||
for (int i = 0; i < ZIP_TABSIZE; ++i)
|
||||
for (auto* item : mFiles)
|
||||
{
|
||||
for (nsZipItem* item = mFiles[i]; item != nullptr; item = item->next)
|
||||
for (; item != nullptr; item = item->next)
|
||||
{
|
||||
if (item->isSynthetic)
|
||||
continue;
|
||||
|
||||
|
||||
//-- add entries for directories in the current item's path
|
||||
//-- go from end to beginning, because then we can stop trying
|
||||
//-- to create diritems if we find that the diritem we want to
|
||||
|
Loading…
x
Reference in New Issue
Block a user